getElementAngularVelocity
Shared
Reads how fast an element turns about each axis, per simulation step.
vec3|false getElementAngularVelocity(element element)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The 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))
endComing from MTAIn MTA this function is called
getElementTurnVelocity.