RedM Natives

GET_ENTITY_FORWARD_VECTOR

Gets the entity's forward vector in XY(Z) eulers.

Hash0x2412D9C05BB09B97
Runtime nameGetEntityForwardVector
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x0A794A5A57F8DF91

Signature

Vector3 GET_ENTITY_FORWARD_VECTOR(Entity entity);

Parameters

NameTypeDescription
entityEntity—

Returns Vector3

Description

Gets the entity's forward vector in XY(Z) eulers.

Usage

Lua
local retval = GetEntityForwardVector(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0x2412D9C05BB09B97, entity, Citizen.ResultAsVector())
JavaScript and C#
JavaScript
const retval = GetEntityForwardVector(entity);

// by hash
const retval = Citizen.invokeNative('0x2412D9C05BB09B97', entity, Citizen.returnResultAnyway(), Citizen.resultAsVector());
C#
Vector3 retval = Function.Call<Vector3>((Hash)0x2412D9C05BB09B97, entity);

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.