EntityClient

getEntityHeadingFromEulers

GET_ENTITY_HEADING_FROM_EULERS0x846BF6291198A71E

The GTA V native GET_ENTITY_HEADING_FROM_EULERS of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityHeadingFromEulers, in JavaScript and in Lua.

SignatureJavaScript
getEntityHeadingFromEulers(entity: Entity): number
SignatureLua
getEntityHeadingFromEulers(entity: Entity): number

Usage

JavaScript
const value = getEntityHeadingFromEulers(entity);
Lua
local value = getEntityHeadingFromEulers(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

float JavaScript number, Lua number

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Gets the heading of the entity physics in degrees, which tends to be more accurate than just "getEntityHeading". This can be clearly seen while, for example, ragdolling a ped/player.

NOTE: The name and description of this native are based on independent research. If you find this native to be more suitable under a different name and/or described differently, please feel free to do so.

Reference

Namespace
Entity ENTITY
In the game
float GET_ENTITY_HEADING_FROM_EULERS(Entity entity)
Hash
0x846BF6291198A71E
Formerly
_GET_ENTITY_PHYSICS_HEADING

Open in the interactive natives reference