GetPlayerFacing

From Warcraft Wiki
Jump to navigation Jump to search

Returns the direction the character is facing in radians.

facing = GetPlayerFacing()

Returns

facing
number - Direction the player is facing in radians, in the [0, 2π] range, where 0 is North and values increase counterclockwise.

Details

  • Indicates the direction the player model is (normally) facing and in which the player will move if he begins walking forward; not the camera orientation.

Patch changes

Legion Patch 7.1.0 (2016-10-25): Returns nil while in a restricted area (instance/battleground/arena).
Wrath-Logo-Small.png Patch 3.1.0 (2009-04-14): Added.