Example of an FPS camera

toAngles()… but this won’t work for all angles. You cannot reliably get predictable euler angles as you want them from a Quaternion.

(starts tape player) Quaternions are compact representation of orientation. Euler angles are a totally ambiguous, often redundant, representation of orientation. Thus if you put some set of euler angles into a quaternion then you will not necessarily get them back out again.

…if you want to base orientation on yaw and pitch as you are doing then you need to keep yaw and pitch, modify those, and create your rotation from them. You can’t go into a quaternion and out again.

Fortunately, I have an example of exactly this using Lemur’s InputMapper.

2 Likes