I’m trying to set the position and rotation of an object to be equal to another object that has a parent.
For position I use: object1.locallyTranslate(object2.absolutePosition);
But this isn’t an option for rotation so I have to use the world matrix?
I googled some and tried doing:
var tempWorldMatrix = object2.getWorldMatrix();
object1.rotationQuaternion = tempWorldMatrix .decompose.rotation;
No luck though. Is there a simple standard way people get local rotation in world space? Thanks!