Yo @Deltakosh … or @sebavan . or anyone
In unity… They have Local Euler Angles and World Euler Angles.
Do we have such a thing in Babylon.
Right now for positions… If i have to convert some position vector3 from World Space to Local Space… I wrote this handle little wrapper for transform coordinates…
/** Inverse transforms position from world space to local space. (Using TransformCoordinates) */
public static InverseTransformPoint(owner: BABYLON.TransformNode | BABYLON.Camera, position:BABYLON.Vector3, compute:boolean = false):BABYLON.Vector3 {
if (compute === true) owner.computeWorldMatrix();
BABYLON.Utilities.TempMatrix.reset();
owner.getWorldMatrix().invertToRef(BABYLON.Utilities.TempMatrix);
return BABYLON.Vector3.TransformCoordinates(position, BABYLON.Utilities.TempMatrix);
}
How would I do something like that for World Space to Local Space Rotations… Or is there even such a thing for babylon ???