开发者

Calculate 3D rotation of a point

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 开发者_StackOverflow社区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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜