UCharacterMovementComponent::MovementMode
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTYBlueprintReadOnly
Description
The character's current movement mode — walking, falling, flying, swimming, or a custom mode.
Caveats & Gotchas
- • Read-only from Blueprint, and shouldn't be set directly from C++ either — call SetMovementMode() so the engine runs the associated transition logic (OnMovementModeChanged, physics setup, etc.).
- • Automatically replicated from server to clients through the Character owner; don't add your own replication for it.
- • When MovementMode is MOVE_Custom, check CustomMovementMode to identify which custom sub-mode is active.
Signature
TEnumAsByte<enum EMovementMode> MovementMode Example
Check whether the character is airborne C++
if (GetCharacterMovement()->MovementMode == MOVE_Falling)
{
// character is airborne
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?