UCharacterMovementComponent::ClearAccumulatedForces
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallablevirtual
Description
Clears forces accumulated through AddImpulse() and AddForce(), and also cancels any pending launch velocity.
Caveats & Gotchas
- • Unlike ApplyAccumulatedForces(), this discards the pending forces/impulses instead of applying them — call it to cancel queued forces, not to commit them.
- • Also zeroes the pending launch velocity, so a queued Launch() call that hasn't been processed yet will silently not happen if you call this first.
Signature
virtual void ClearAccumulatedForces() Return Type
void Example
Cancel queued forces before a mode change C++
GetCharacterMovement()->ClearAccumulatedForces();
GetCharacterMovement()->SetMovementMode(MOVE_Flying); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?