I have an object in my game and I have its location, rotation and scaling in separate float. 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?
- invert the object's transform
- apply that transformation to your world space rotation
- the result is your object space rotation