UCharacterMovementComponent::CanStopPathFollowing
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualoverride
Description
Queried by the path following component to check whether it is safe to stop an in-progress path-following move right now, for example when the move is cancelled or the goal changes.
Caveats & Gotchas
- • Overrides UNavMovementComponent::CanStopPathFollowing() — returning false does not pause the move, it just tells the path follower to keep driving until a later tick allows a stop.
- • Commonly overridden to return false while falling, so AI-controlled characters don't have their velocity zeroed out mid-air when a path is aborted.
- • Not called for movement stopped via StopActiveMovement() directly — that bypasses the path-following stop check entirely.
Signature
virtual bool CanStopPathFollowing() const override Return Type
bool Example
Preventing a mid-air stop C++
bool UMyCharacterMovementComponent::CanStopPathFollowing() const
{
if (IsFalling())
{
return false;
}
return Super::CanStopPathFollowing();
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?