Using yaw/pitch/roll to represent a rotation is very convenient because it is easy to understand, but when pitch = 90 or -90, yaw/pitch/roll rotations experience gimbal lock. This is a situation where yaw and roll overlap each other and do the same thing. You can search Wikipedia or youtube for explanations (https://www.youtube.com/watch?v=N5PDboNJwks). The only way to avoid gimbal lock is to use a more complicated rotation representation, such as quaternions (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation) or rotation matrices. In Altus, we have a quatd class that represents a quaternion, and the Transform behaves similar to a rotation matrix.