self:set_motion_mode

Client

Sets the motion mode of the character body


Syntax

local status = self:set_motion_mode(
    mode
)

Parameters

TypeNameDescription
intmodeMotion mode enum value — refer to physics.character.motion_mode

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the motion mode of a character body
local entity = physics.character.create()

entity:set_motion_mode(physics.character.motion_mode.GROUNDED)

On this page