UCharacterMovementComponent::CanStartPathFollowing
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualoverride
Description
Queried by the path following component to check whether this character is currently in a movement state where following a path can begin.
Caveats & Gotchas
- • Overrides UNavMovementComponent::CanStartPathFollowing() — the base UMovementComponent has no path-following concept at all.
- • Called every time UPathFollowingComponent tries to start or resume a move; returning false silently blocks AI movement requests without an error.
- • The default implementation checks movement mode, not whether a valid path exists — a bogus or unreachable path can still 'start' successfully.
Signature
virtual bool CanStartPathFollowing() const override Return Type
bool Example
Blocking path following while ragdolled C++
bool UMyCharacterMovementComponent::CanStartPathFollowing() const
{
if (bIsRagdolling)
{
return false;
}
return Super::CanStartPathFollowing();
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?