UCharacterMovementComponent::StopActiveMovement
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualoverride
Description
Cancels in-progress movement input by zeroing Acceleration and clearing any pending path-following requested velocity.
Caveats & Gotchas
- • Calls Super::StopActiveMovement() first, which clears PendingInputVector on the owning pawn — so both C++ input and any queued path-following move are stopped.
- • Does not change the current Velocity, so the character can still coast to a stop under friction/braking rather than halting instantly.
Signature
virtual void StopActiveMovement() override Return Type
void Example
Stopping movement on stun C++
void AMyCharacter::OnStunned()
{
GetCharacterMovement()->StopActiveMovement();
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?