![ThetaStarPathfindingExample.gif](https://static.wixstatic.com/media/eb8edf_7f769e5c1d4a4ecd8a0057f32ebf9463~mv2.gif)
![AStarBad.png](https://static.wixstatic.com/media/eb8edf_151bb7885b7b4da1bd9c9d5a3a52c5e5~mv2.png/v1/fill/w_463,h_248,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/AStarBad.png)
A* Path
![Thetastargood.png](https://static.wixstatic.com/media/eb8edf_91c08459ec754c3fad320fcfc21f06e4~mv2.png/v1/fill/w_507,h_248,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/Thetastargood.png)
Theta* Path
One of the challenges I encountered was finding the right balance between ensuring that the agent follows a collision-free path and incorporating sufficient interpolation and smoothing techniques to achieve a visually realistic flight.
I imlpemented 3 features to overcome this:
-
A completely adjustable Agent script for its flight characteristics (speed, turn rate, interpolation sensitivity)
-
In the pathing manager, a collision avoidance buffer that can be adjusted to each maps requirements.
-
Secondary Collision avoidance through raycasts on the Agent. These Create a new path, away from the direction that a collision was detected near the agent.
Features
01.
3D pathfinder for Agents to fly around 3D space.
02.
Statemachine AI that can follow the path and request new paths.
03.
Multi-Agent Control.
04.
Evasive Behaviours around moving targets.
05.
Optional Preset Patrol Routes
![](https://static.wixstatic.com/media/eb8edf_b8b68445c11e4f7db299a80ab030ba1c~mv2.gif/v1/fill/w_411,h_338,q_90/eb8edf_b8b68445c11e4f7db299a80ab030ba1c~mv2.gif)
![](https://static.wixstatic.com/media/eb8edf_85336b3c06b14f30876575c79417179e~mv2.gif/v1/fill/w_411,h_369,q_90/eb8edf_85336b3c06b14f30876575c79417179e~mv2.gif)
![](https://static.wixstatic.com/media/eb8edf_f2cf2ea57b56420daff369445cf36d88~mv2.gif/v1/fill/w_410,h_330,q_90/eb8edf_f2cf2ea57b56420daff369445cf36d88~mv2.gif)