Skip to main content

MotionState

ZEPETO.Character.Controller.MotionState

Class for managing character motion state and configuration.

Hierarchy

Constructors

constructor

new MotionState($character)

Parameters

NameType
$characterZepetoCharacter

Overrides

System.Object.constructor

Accessors

currentJumpState

get currentJumpState(): CharacterJumpState

Retrieves the current jump state of the character.

Returns

CharacterJumpState


currentLandingState

get currentLandingState(): CharacterLandingState

Retrieves the current landing state of the character.

Returns

CharacterLandingState


currentMoveState

get currentMoveState(): CharacterMoveState

Retrieves the current movement state of the character.

Returns

CharacterMoveState


doubleJumpPower

get doubleJumpPower(): number

Additional force applied during a double jump.

Returns

number

set doubleJumpPower(value): void

Additional force applied during a double jump.

Parameters

NameType
valuenumber

Returns

void


gravity

get gravity(): number

Gravitational force applied to the character.

Returns

number

set gravity(value): void

Gravitational force applied to the character.

Parameters

NameType
valuenumber

Returns

void


landingRollSpeed

get landingRollSpeed(): number

Gets or sets the character's landing roll speed.

Returns

number

set landingRollSpeed(value): void

Gets or sets the character's landing roll speed.

Parameters

NameType
valuenumber

Returns

void


useDoubleJump

get useDoubleJump(): boolean

Determines whether the character can perform a double jump.

Returns

boolean

set useDoubleJump(value): void

Determines whether the character can perform a double jump.

Parameters

NameType
valueboolean

Returns

void


useLanding

get useLanding(): boolean

Determines whether to apply landing motion.

Returns

boolean

set useLanding(value): void

Determines whether to apply landing motion.

Parameters

NameType
valueboolean

Returns

void


useLandingRoll

get useLandingRoll(): boolean

Determines whether the character performs a roll upon landing.

Returns

boolean

set useLandingRoll(value): void

Determines whether the character performs a roll upon landing.

Parameters

NameType
valueboolean

Returns

void


useMoveTurn

get useMoveTurn(): boolean

Determines whether to play a motion for changing the character's movement direction.

Returns

boolean

set useMoveTurn(value): void

Determines whether to play a motion for changing the character's movement direction.

Parameters

NameType
valueboolean

Returns

void