You can use the Yaw, and the Pitch the player is looking at. The yaw is the rotation on the y-axis, and when you look straight North it is set to 0. The pitch is the up-down-axis, and when you look straight ahead, it is set to 0.You can see the Pitch and Yaw, if you do F3, in-game.
↧