M MY Multiplayer: Wiki
Side
Kind

getElementAngularVelocity

Shared

Reads how fast an element turns about each axis, per simulation step.

vec3|false getElementAngularVelocity(element element)

Parameters

NameTypeDescription
elementelementThe element to read.

Returns

A vec3 with the turn speed, or false if the element does not turn (it is not physical).

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    local spin = getElementAngularVelocity(vehicle)
    outputDebugString(("spin: %.3f"):format(spin.z))
end
Coming from MTAIn MTA this function is called getElementTurnVelocity.

See also