Uploaded February 2025 | Updated September 2026, 3 hours ago
Pathfinding is about getting from point A to point B as efficiently as possible, which a standard A algorithm can handle. However, in more complex scenarios, AI must also avoid detection or enemy fire, a challenge known as tactical pathfinding, where the AI balances short travel times with stealth and safety. Whether it's a tank platoon retreating behind a ridgeline or an X-Fighter maneuvering through a cloud of meteoroids, the AI must consider enemy positions and lines of fire to make intelligent movement decisions. Tactical pathfinding enhances realism, making AI movement more strategic and unpredictable, resulting in a more challenging and rewarding experience for players.
This video will show you how to extend the standard A algorithm to generate tactical paths, allowing AI to navigate intelligently while considering enemy threats.
Want to support me? π
Buy me a coffee! ko-fi.com/adammyhre
π Subscribe for more Unity Tutorials youtube.com/@git-amend
Discord: discord.gg/FDRZGQBBUC
#unity3d #gamedev #indiedev
β¬ Contents of this video β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
0:00 The Grid
9:20 Tactical Pathfinding Algorithm
14:08 Tactical Agent
*Source code:* gist.github.com/adammyhre/6317b014d4050514771b6020bf79ecc0
Priority Queue: gist.github.com/adammyhre/d896df0cf20e4e10672483b7f3200d87
More Useful Code:
github.com/adammyhre?tab=repositories
Unity Utility Library: github.com/adammyhre/Unity-Utils
Lock Inspector Hotkey: gist.github.com/adammyhre/4754f731a93bf1cab0d1385ccfa23642
Assets Shown In This Video (Affiliate Links)
PBR Customized Soldier - assetstore.unity.com/packages/p/pbr-customized-soldier-111945?aid=1101lw3sv
KUBOLD - Cover Rifle Animset Pro - assetstore.unity.com/packages/3d/animations/cover-rifle-animset-pro-23360?aid=1101lw3sv
KUBOLD - Rifle Animset Pro - assetstore.unity.com/packages/3d/animations/rifle-animset-pro-15098?aid=1101lw3sv
Proto Paper - assetstore.unity.com/packages/vfx/shaders/proto-paper-262722?aid=1101lw3sv
Beautify: assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-3-advanced-post-processing-233073?aid=1101lw3sv
Umbra Soft Shadows: assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/umbra-soft-shadows-better-directional-contact-shadows-for-urp-282485?aid=1101lw3sv
Wingman - assetstore.unity.com/packages/tools/utilities/wingman-your-inspector-s-best-friend-303181?aid=1101lw3sv
Logwin - assetstore.unity.com/packages/tools/utilities/logwin-log-debug-values-tracker-149558?aid=1101lw3sv
Odin - assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041?aid=1101lw3sv
Odin Validator - assetstore.unity.com/packages/tools/utilities/odin-validator-227861?aid=1101lw3sv
Hot Reload: assetstore.unity.com/packages/tools/utilities/hot-reload-edit-code-without-compiling-254358?aid=1101lw3sv
Hierarchy Icons: assetstore.unity.com/packages/tools/utilities/better-hierarchy-272963?aid=1101lw3sv
Better Transform: assetstore.unity.com/packages/tools/utilities/better-transform-size-notes-global-local-workspace-child-parent--276554?aid=1101lw3sv
Better Mesh Filter: assetstore.unity.com/packages/tools/utilities/better-mesh-filter-266489?aid=1101lw3sv
Editor Console Pro: assetstore.unity.com/packages/tools/utilities/editor-console-pro-11889?aid=1101lw3sv
Any Object Finder: assetstore.unity.com/packages/tools/utilities/any-object-finder-286455?aid=1101lw3sv
Clipper PRO: assetstore.unity.com/packages/tools/utilities/clipper-pro-the-ultimate-clipboard-277112?aid=1101lw3sv
*Follow me!*
https://linktr.ee/gitamend
Pathfinding is about getting from point A to point B as efficiently as possible, which a standard A algorithm can handle. However, in more complex scenarios, AI must also avoid detection or enemy fire, a challenge known as tactical pathfinding, where the AI balances short travel times with stealth and safety. Whether it's a tank platoon retreating behind a ridgeline or an X-Fighter maneuvering through a cloud of meteoroids, the AI must consider enemy positions and lines of fire to make intelligent movement decisions. Tactical pathfinding enhances realism, making AI movement more strategic and unpredictable, resulting in a more challenging and rewarding experience for players.
This video will show you how to extend the standard A algorithm to generate tactical paths, allowing AI to navigate intelligently while considering enemy threats.
Want to support me? π
Buy me a coffee! ko-fi.com/adammyhre
π Subscribe for more Unity Tutorials youtube.com/@git-amend
Discord: discord.gg/FDRZGQBBUC
#unity3d #gamedev #indiedev
β¬ Contents of this video β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
0:00 The Grid
9:20 Tactical Pathfinding Algorithm
14:08 Tactical Agent
*Source code:* gist.github.com/adammyhre/6317b014d4050514771b6020bf79ecc0
Priority Queue: gist.github.com/adammyhre/d896df0cf20e4e10672483b7f3200d87
More Useful Code:
github.com/adammyhre?tab=repositories
Unity Utility Library: github.com/adammyhre/Unity-Utils
Lock Inspector Hotkey: gist.github.com/adammyhre/4754f731a93bf1cab0d1385ccfa23642
Assets Shown In This Video (Affiliate Links)
PBR Customized Soldier - assetstore.unity.com/packages/p/pbr-customized-soldier-111945?aid=1101lw3sv
KUBOLD - Cover Rifle Animset Pro - assetstore.unity.com/packages/3d/animations/cover-rifle-animset-pro-23360?aid=1101lw3sv
KUBOLD - Rifle Animset Pro - assetstore.unity.com/packages/3d/animations/rifle-animset-pro-15098?aid=1101lw3sv
Proto Paper - assetstore.unity.com/packages/vfx/shaders/proto-paper-262722?aid=1101lw3sv
Beautify: assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-3-advanced-post-processing-233073?aid=1101lw3sv
Umbra Soft Shadows: assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/umbra-soft-shadows-better-directional-contact-shadows-for-urp-282485?aid=1101lw3sv
Wingman - assetstore.unity.com/packages/tools/utilities/wingman-your-inspector-s-best-friend-303181?aid=1101lw3sv
Logwin - assetstore.unity.com/packages/tools/utilities/logwin-log-debug-values-tracker-149558?aid=1101lw3sv
Odin - assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041?aid=1101lw3sv
Odin Validator - assetstore.unity.com/packages/tools/utilities/odin-validator-227861?aid=1101lw3sv
Hot Reload: assetstore.unity.com/packages/tools/utilities/hot-reload-edit-code-without-compiling-254358?aid=1101lw3sv
Hierarchy Icons: assetstore.unity.com/packages/tools/utilities/better-hierarchy-272963?aid=1101lw3sv
Better Transform: assetstore.unity.com/packages/tools/utilities/better-transform-size-notes-global-local-workspace-child-parent--276554?aid=1101lw3sv
Better Mesh Filter: assetstore.unity.com/packages/tools/utilities/better-mesh-filter-266489?aid=1101lw3sv
Editor Console Pro: assetstore.unity.com/packages/tools/utilities/editor-console-pro-11889?aid=1101lw3sv
Any Object Finder: assetstore.unity.com/packages/tools/utilities/any-object-finder-286455?aid=1101lw3sv
Clipper PRO: assetstore.unity.com/packages/tools/utilities/clipper-pro-the-ultimate-clipboard-277112?aid=1101lw3sv
*Follow me!*
https://linktr.ee/gitamend










