An alternative to Euler angles is quaternions, which don't suffer from gimbal lock (coordinate singularity at the poles), unlike Euler angles. Interesting visualization I found online:
https://quaternions.online/

mkeshavarzi

Adding to the comment by @nahman, many modern game engines use quaternions as a default transformation method. Information on how to convert Euler angles to quaternions can be found here: http://www.camelsoftware.com/2016/02/21/quaternion-formulas/

An alternative to Euler angles is quaternions, which don't suffer from gimbal lock (coordinate singularity at the poles), unlike Euler angles. Interesting visualization I found online: https://quaternions.online/

Adding to the comment by @nahman, many modern game engines use quaternions as a default transformation method. Information on how to convert Euler angles to quaternions can be found here: http://www.camelsoftware.com/2016/02/21/quaternion-formulas/