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
| Type | Name | Description |
|---|---|---|
bool | state | true to lock rotation, false to allow it |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.rigid.create()
entity:set_lock_rotation_enabled(true)