self:get_constant_linear_velocity

Client

Retrieves the constant linear velocity applied by the animatable body to bodies resting on it, such as a conveyor surface


Syntax

local velocity = self:get_constant_linear_velocity()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3velocityCurrent constant linear velocity as {x, y, z}

Examples

Get the constant linear velocity of a animatable body
local entity = physics.animatable.create()
local velocity = entity:get_constant_linear_velocity()

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

On this page