self:get_axis_lock

Client

Checks whether a specific movement axis is locked on the character body


Syntax

local result = self:get_axis_lock(
    axis
)

Parameters

TypeNameDescription
intaxisAxis enum value — refer to physics.character.axis

Returns

TypeNameDescription
boolresulttrue if the axis is locked, false otherwise

Examples

Check an axis lock on a character body
local entity = physics.character.create()

core.engine.print("info", "Character body axis lock:", entity:get_axis_lock(physics.character.axis.LINEAR_X))

On this page