Good, this works smoothly, but what if the box have parent nodes? My playground is made to simulate this case, but absoluteRotationQuaternion does not seem to work.
If the box have multi levels of hierarchy, should the parents be iterated in forward or reverse order, to multply rotationQuaternions, in initialization and onDragObservable?
orientations accumulate. So the hierarchy leave (the end of the transform hierarchy tree) orientation should be the same with the proxy and the object it’s attached to. basically, world space quaternions of the proxy and the box should be the same. And to compute that world space quaternion, multiply the quaternion by the world space quaternion of its parent recursively.
I’ve asked AI about that, and it said that’s a limit in current decompose algorithm, and singular value decomposition is needed in case of “sheared matrix”.
A few searches leads me to svd-js, and here is an example of using it with RotationGizmo.
So, could there be a real fix with this, so that no proxy node needed?