- Home /
Can i use pathfinding AI to make enemies avoid each other ?
Hi :) I have three types of 2d ships ( green, blue, yellow) that are being instantiated randomly and a tank which is the target, I want them to avoid each other when sailing, the thing is every type is instantiated multiple times so I can have blue ship in front of another blue ship for example, so how can I make all ships move with no weird collisions ?
Answer by unity_-v4z-HsChKdEYQ · Aug 04, 2019 at 05:56 PM
what kind of pathfinding ai are you using? if you use the a star pathfinding that many people use you can easily set the objects you want to avoid collisions with in a seperate layer so their colliders dont interact with each other
Yes i'll be using A*, but it's not just about collisions, i want them to move and rotate a bit when facing another ships (avoiding them), green, blue , yellow. I want them all to avois each other.
Your answer
Follow this Question
Related Questions
Enemy chase script // No longer attacking 0 Answers
Multiple Cars not working 1 Answer
Navmeshagent wont go after player after stopping! 2 Answers
Can't properly duplicate an enemy AI 0 Answers