MovementState


Declaration

[Serializable]
public sealed class MovementState

Description

A context object that represents a character's movement state.

Properties

flagsThe active movement flags.
previousFlagsThe movement flags from the last frame.
speedThe speed of the character.
inputThe movement vector read from the input system after deadzone processing is applied.
localDirectionThe direction of the character in local space.
directionThe direction of the character in world space.
gravityThe current gravity force applied to the character.
externalForceA custom external force applied to the character. This value is reset each frame.
rotationThe rotation of the character.
groundThe ground contact info.

Methods

SetTurns on or off the given movement flag(s).