self:get_axis_lock
Client
Checks whether a specific movement axis is locked on the animatable body
Syntax
local result = self:get_axis_lock(
axis
)Parameters
| Type | Name | Description |
|---|---|---|
int | axis | Axis enum value — refer to physics.animatable.axis |
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the axis is locked, false otherwise |
Examples
local entity = physics.animatable.create()
core.engine.print("info", "Animatable body axis lock:", entity:get_axis_lock(physics.animatable.axis.LINEAR_X))