Skip SGF navigation

Practical guide

Help an NPC notice and move

Give an NPC one thing to notice and one reachable place to go.

SGF 1.0.1 · Unreal Engine 5.8 · Reviewed

When you finish

Your NPC can notice a test target and use a reachable destination in the test map.

On this page

StormAISenses gathers observations. StormAIThreat uses those observations to decide which actors deserve attention and for how long. StormAINavigation handles move requests and reports whether the agent reached the goal. Set up and check those three parts in that order.

Notice a target

  1. Start with the AI-controlled character from the first behaviour guide. Give the test NPC and one other actor a team or faction. Use the team relations settings to define how the factions see one another.
  2. Create a Senses Config with a small observation area and a suitable candidate filter. Assign it to your NPC’s senses setup. Test with the target inside and outside the area.
  3. Create a Threat Config for the same NPC. Choose which observations affect threat and how long the NPC should retain interest when they stop. Check what happens when the target leaves and returns.

Move to a reachable location

  1. Add navigation coverage to your test map. Check that the NPC and its destination are on connected walkable ground.
  2. Give the NPC a state or action that requests movement, beginning with a fixed nearby destination. Check arrival first, then put an obstruction in its path and see what result the action receives.
  3. Use the current threat or a selected aim point as a destination only after movement to the fixed location works. Choose what your NPC should do when the route fails or its target disappears.