- Home /
how to make multiple built-in AI Vehicle Avoid Each Other ?
hello , i am make a car racing game , i use the standard AI vehicle as enemy of the player every thing work fine instead that AI vehicles Doesn't avoid other cars enemy + me and also Stuck on walls How to Fix That ?
Unity created the Nav$$anonymous$$esh just for this purpose, but you will need to go to WIndow > Navigation > Bake, to bake the Nav$$anonymous$$esh, and then put a Nav$$anonymous$$eshAgent on your entities, they will then check for and avoid obstacles, most likely using raycasting.
I'm not sure what you mean by "standard AI vehicle", but it sounds like you need some sort of distance check as part of the algorithm which changes its path/target/speed depending on the position of other vehicles. Doesn't sound like a flocking algorithm would really fit since they're likely otherwise autonomous, but there needs to be a distance check.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Need help with wheel colliders! 0 Answers
unity 5 car physics problems HELP 1 Answer
Car Physics 0 Answers