Returns the player's current pitch (slope or angle of movement). Only valid for the unitID "player". The slope returned here reflects only the direction of movement for swimming or flying, not the current orientation of the player model or camera. (When on solid ground, GetUnitPitch indicates what the angle of flight would be were the player to start flying.)

The returned value is in radians, with positive values indicating upward slope, negative values indicating downward slope, and 0 indicating perfectly level flight (or swimming).


See also Player information functions.

Signature:

pitch = GetUnitPitch("unit")

Arguments:

  • unit - Unit to query; only valid for player (string, unitID)

Returns:

  • pitch - Unit's slope of movement in radians (number)