How do I calculate the pitch, yaw, and roll angles for a point in 3D space?
I'm working on a game where the player character must face towards an object that's flying around.
How do I calculate the pitch, yaw, and roll angles for a point in 3D space?
I'm working on a game where the player character must face towards an object that's flying around.
For yaw, use the atan2() of the X and Y coordinates. For the pitch, use the X-Y magnitude and the Z coordinate. Points don't have a roll.