I am trying to figure out how to calculate the rotation of a camera as if it were attached to a box, without actually parenting the two together.
In THREE.js, there is object.worldToLocal(position) which helps determine the camera's position relative to the box. However, I am now seeking a similar function for euler or quaternion rotations.
In Unity, they provide transform.InverseTransformDirection(vector), and I am in search of a comparable solution for my current project.
Any suggestions would be greatly appreciated!