I have an object in my game and I have its location, rotation and scaling in separate float[3]. The location rotation and scale are all on the global axis; these do not change based on the objects rotation. How would I convert them to the local axis where the xyz always corresponds to the same face?
\$\begingroup\$
\$\endgroup\$
1
-
\$\begingroup\$ Welcome to GameDev.SE! Take a look at the tour, and the help center if you have other questions about how this place works. Thank you for thanking us in advance, too, but I've edited that part out of your answer since comments in questions like that aren't necessary and can add clutter. :) \$\endgroup\$– doppelgreenerOct 4, 2013 at 3:50
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
- invert the object's transform
- apply that transformation to your world space rotation
- the result is your object space rotation