ACharacter::UpdateNavigationRelevance
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualoverride
Description
Notifies the navigation system whether this Character should be considered for dynamic obstacle/agent registration. ACharacter propagates the relevance flag to its CapsuleComponent.
Caveats & Gotchas
- • Called automatically by the navigation system when relevance conditions change — do not call it manually in a tick; use SetCanAffectNavigationGeneration() to control the underlying flag instead.
- • If you add non-capsule collision components that should also affect navigation, you must override this and update their bCanEverAffectNavigation flags, as the base implementation only touches the CapsuleComponent.
Signature
ENGINE_API virtual void UpdateNavigationRelevance() override; Return Type
void Example
Override to also update a custom collision component's nav relevance C++
void AMyCharacter::UpdateNavigationRelevance()
{
Super::UpdateNavigationRelevance();
if (CustomNavBlocker)
{
CustomNavBlocker->SetCanEverAffectNavigation(bCanAffectNavigationGeneration);
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?