self:set_lock_rotation_enabled

Client

Sets whether rotation is locked on the rigid body


Syntax

local status = self:set_lock_rotation_enabled(
    state
)

Parameters

TypeNameDescription
boolstatetrue to lock rotation, false to allow it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Lock rotation on a rigid body
local entity = physics.rigid.create()

entity:set_lock_rotation_enabled(true)

On this page