I recently ran into some issues using UnitQuaternion::from_euler_angles
because I misinterpreted the documentation on which order the the rotations are specified. The function takes (roll, pitch, yaw)
as args, but doesn’t specify which axes roll/pitch/yaw refer to. I’m used to working in a “Z is forward/backward”, and so I took this to mean the arguments correspond to (z, x, y)
, however after some confusion I realized that the arguments do in fact correspond to (x, y, z)
(which makes more sense in retrospect), corresponding to a “Z is up/down” orientation.
Would it make more sense to refer explicitly to rotation around the primary axes, rather than using roll/pitch/yaw? Using the [aircraft principle axes] to communicate rotation relies on a shared reference for which direction is forward, and the terminology can be different in different contexts. It seems to me like it would be far less ambiguous to refer to the x/y/z axes directly.
Is there any reason why that wouldn’t be ideal? I’m coming from a game dev background without a strong understanding of the more abstract math concepts that drive a lot of nalgebra’s design, so I might be missing a reason why it makes more sense to use the aircraft principle axes instead of x/y/z.