self:set_constant_linear_velocity

Client

Sets the constant linear velocity the animatable body applies to bodies resting on it, such as a conveyor surface


Syntax

local status = self:set_constant_linear_velocity(
    velocity
)

Parameters

TypeNameDescription
vector3velocityVelocity to apply as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_constant_linear_velocity({2, 0, 0})

On this page