RealDocs

UCharacterMovementComponent::SetMovementMode

function Engine Blueprint Since 4.0
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintCallablevirtual

Description

Immediately changes the character's movement mode. Use this to force transitions between walking, flying, swimming, or a custom movement mode.

Signature

virtual void SetMovementMode(EMovementMode NewMovementMode, uint8 NewCustomMode = 0)

Parameters

Name Type Description Default
NewMovementMode EMovementMode The movement mode to switch to (Walking, Falling, Swimming, Flying, Custom, None).
NewCustomMode uint8 Sub-mode index when using MOVE_Custom. Ignored for all other modes. 0

Return Type

void

Caveats & Gotchas

  • Setting MOVE_None disables all movement processing. The character will stop responding to input until the mode is restored.
  • On the server this is authoritative. On clients it is a prediction — the server may correct it next frame.
  • Triggering MOVE_Falling manually will start applying gravity immediately, bypassing jump logic.

Example

Enable flying mode C++
GetCharacterMovement()->SetMovementMode(MOVE_Flying);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.