Original Post
I'm currently looking to transform an object from the 3DSMAX coordinate system (Z-up, Y-forward, X-right) to a different coordinate system (Z-forward, Y-down, X-right). Both are Right Hand Rule rotation. To do this I wrote the following code... fn convertRotation origRotation = ( Original_Matrix = origRotation as matrix3 format "Original: %\n" Original_Matrix -- Transform matrix zero = Point3 0 0 0 nb = Point3 0 0 -1 -- y bank becomes -z bank nh = Point3 0 -1 0 -- z heading becomes -y heading np = Point3 1 0 0 -- x pitch stays Transform_Matrix = matrix3 np nb nh zero format "Transform: %\n" (Transform_Matrix); -- Result Resultant_Matrix = Transform_Matrix * Original_Matrix; format "Resultant: %\n" Resultant_Matrix; format "Result Angles: %\n" (Resultant_Matrix as eulerangles); return Resultant_Matrix as eulerangles; ) My problem seems to be, simply, it doesn't work. It may be that the destination coordinate system applies the euler angles in a different order than I'm expecting, but I was hoping someone here could tell me if the code I've written is correct or not.