views:

68

answers:

1

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.

+3  A: 

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.

Ignacio Vazquez-Abrams