With a rotated object in my scene, how can I translate a global vector into the local space of that rotated object, so that they are rendered in the same spot of the global vector?
Take for example a cube that is rotated but at the global origin. Now I would like to render lines for each global dimension (x, y, z), but added as children to the rotated cube, not the global scene. How do I calculate and in three.js implement the rotation of those vectors so they will line up?
You want to add an object as a child of a parent object such that the world position and orientation of the child do not change.
You can do that using the following pattern:
parent.attach( object );
three.js r.107
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With