RealDocs

AActor::IsComponentRelevantForNavigation

function Engine Since 4.8
#include "GameFramework/Actor.h"
Access: public Specifiers: virtualconst

Description

Override to control whether a specific owned component contributes geometry to the navigation mesh. Returns true by default, meaning all components export collision to navmesh. Override to return false for components you want to exclude (e.g., on projectiles).

Caveats & Gotchas

  • This is a master switch per component — it gates the entire navmesh export for that component. If you return false here, the component's collision will be invisible to pathfinding regardless of its collision settings.
  • The navigation system queries this during navmesh generation and incremental updates. Changing the return value at runtime does not automatically trigger a navmesh rebuild; you may need to force a dirty region update.

Signature

virtual bool IsComponentRelevantForNavigation(UActorComponent* Component) const { return true; }

Parameters

Name Type Description Default
Component UActorComponent* The component being queried for navigation relevance.

Return Type

bool

Example

Exclude all components on a projectile actor from navigation C++
// AMyProjectile.h
virtual bool IsComponentRelevantForNavigation(UActorComponent* Component) const override { return false; }

// This prevents the projectile's collision from punching holes in the navmesh.

Version History

Introduced in: 4.8

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.