Skip to content

Find path to an actor

Connect your quest, interaction, or marker system to Find Path to Actor on BP_WaypointComponent. This tutorial mirrors the shipped ThirdPersonCharacter pattern with a minimal standalone example.

When the player accepts a quest or selects an objective, draw a nav path to that actor.

flowchart TD
  Quest[Quest / interaction system] --> SetTarget[Store target Actor reference]
  SetTarget --> Call[Find Path to Actor on BP_WaypointComponent]
  Call --> Internal[Internal_StartPathFinding]
  Internal --> Spawn[Spawn or spline visuals]

Example — key press to current objective

Section titled “Example — key press to current objective”

This matches the demo project’s F key binding.

On your player character:

  1. Add BP_WaypointComponent (see Getting started).
  2. Add a Spline Component on the same actor if you plan to use SplineMesh mode later (optional for Spawn mode).

Add an Actor variable on your character, for example Current Objective:

VariableTypeDefault
Current ObjectiveActor (or BP_ObjectiveActor)None

Set it from your quest Blueprint when the player accepts a task:

sequenceDiagram
  participant Quest as BP_QuestGiver
  participant PC as Your character
  participant WC as BP_WaypointComponent
  Quest->>PC: Set Current Objective = self
  PC->>WC: Find Path to Actor (Current Objective, Spline)

Create a function Update Objective Path (or copy from ThirdPersonCharacter → Find Path to Actor):

StepBlueprint node
Validate targetIs Valid on Current Objective
Fallback (optional)Get All Actors of ClassBP_ObjectiveActor → index 0
PathfindBP_WaypointComponent → Find Path to Actor
InputsActor = objective, Spline Component = pawn spline (can be None in Spawn mode)

Minimal graph (Spawn mode, no HUD):

[Input Action or Custom Event]
→ Is Valid (Current Objective)
→ Find Path to Actor (Current Objective, None)

If the objective actor moves (patrol NPC, moving platform):

SettingValueEffect
Tick Time0.251.0Re-queries path automatically
Mesh Distance250350Wider spacing reduces spawn cost

Leave Tick Time at 0 if the target is static and you only path once.

Alternative pattern without a global quest variable:

  1. BP_ObjectiveActor (or your interactable) fires On Interacted.
  2. Cast to player → get BP_WaypointComponent.
  3. Call Find Path to Actor with self as the actor input.
sequenceDiagram
  participant Obj as BP_ObjectiveActor
  participant PC as Player character
  participant WC as BP_WaypointComponent
  Obj->>PC: On overlap / interact
  PC->>WC: Find Path to Actor (Obj, Spline)

Place BP_ObjectiveActor in the level for a visible billboard marker (T_Objective texture on Material Billboard).

SettingValueReason
Tick Time0.5Escort NPC moves
Max Number Of Meshes40Limit spawn count on long paths
Mesh Distance300Slightly sparser trail
Nav Filter ClassYour custom filterOptional — restrict to walkable areas only

Apply on BP_WaypointComponent class defaults on the player pawn.

ActionHow
Toggle offSet Enable Waypoint (false)
New targetCall Find Path to Actor again with the new actor
Location switchFind Path to Location clears actor mode internally

Study the full demo wiring (HUD toggle, fallback actor search):

  • ThirdPersonCharacter → Find Path to Actor
  • ThirdPersonCharacter → EventGraphF key binding

You do not need to migrate ThirdPersonCharacter — only BP_WaypointComponent and its dependencies.