self:get_angular_velocity

Client

Retrieves the angular velocity of the rigid body


Syntax

local velocity = self:get_angular_velocity()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3velocityCurrent angular velocity as {x, y, z}

Examples

Get the angular velocity of a rigid body
local entity = physics.rigid.create()
local velocity = entity:get_angular_velocity()

core.engine.print("info", "Rigid body velocity:", util.table.unpack(velocity))

On this page