UCharacterMovementComponent::Deactivate
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualoverride
Description
Deactivates the movement component, clearing any accumulated forces and resetting the owning character's jump state once the component is fully inactive.
Caveats & Gotchas
- • Temporarily sets NavMovementProperties.bStopMovementAbortPaths to false around the Super::Deactivate() call so in-progress paths aren't aborted, then restores it afterward.
- • Only clears accumulated forces and resets jump state if IsActive() actually returns false after Super::Deactivate() runs — a subclass override of IsActive() could prevent that.
Signature
virtual void Deactivate() override Return Type
void Example
Overriding Deactivate C++
void UMyCharacterMovementComponent::Deactivate()
{
Super::Deactivate();
if (!IsActive())
{
UE_LOG(LogTemp, Log, TEXT("Movement fully deactivated"));
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?