Game uses scent trails instead of pathfinding to implement enemy tracking
Understand this story
The game "Helms of Fury" does not use Godot's Navigation2D or AStar pathfinding, and instead uses "scent trails" to let enemy AI track the player around obstacles. The player drops a Scent node with a Timer every 0.1 seconds, recording historical positions. The enemy first uses RayCast2D together with Physics Layers to fire directly at the player; when line of sight is blocked, it uses rays to check trail points in order, and upon hitting a visible trail point, turns to pursue. This approach was shared by abitawake in a tutorial, who says this method works well in this game.
AI overview based on source reports · Updated 3 hr ago
Coverage timeline
Follow the coverage to explore different perspectives.
- Hacker News AIEnemy AI: chasing a player without Navigation2D or A* pathfinding (2020)
This tutorial describes a Godot approach for enemy chasing that avoids Navigation2D and A* by having the player drop a "scent trail" of past positions on a timer, which enemies follow when a RayCast2D shows the player is blocked. Enemies raycast to the player first and, if obstructed, check the scent trail in order until one is visible, then move toward it. It assumes KinematicBody2D enemies managed by a state machine and requires Physics Layers configured so the ray detects blocking objects.
Activity for this story
- Current comparable activity
- 9
- Peak comparable activity
- 10Nov 20 17:00
- Change in the past 24 hours
- –
Trends compare the same fully observed participants, which may cover fewer participants than current activity. Move the pointer or tap the chart to inspect hourly activity; use the left and right arrow keys with a keyboard.