Skip to content

Find path to actor

flowchart LR
  Quest[Quest sets ObjectiveActor] --> Input[Player input or auto]
  Input --> WC[Waypoint Component]
  WC --> Nav[Nav mesh path]
  Nav --> Vis[Spawn or Spline visuals]
Event InputAction FindObjective
→ Get Waypoint Component (from player)
→ Find Path to Actor
Target Actor: ObjectiveActor variable

Toggle off trail:

Deactivate on Waypoint Component
— or clear target and call internal finish via new path call
void AMyCharacter::ShowPathToObjective(AActor* Objective)
{
if (WaypointComponent && Objective)
{
WaypointComponent->FindPathToActor(Objective);
}
}

For a Scene Component marker (e.g. arrow on a moving platform):

WaypointComponent->FindPathToComponent(TargetArrow);
Target behaviorSettings
Static objectiveTick Time = 0, call once
Moving NPCTick Method = Time, Tick Time = 0.250.5