Enemy doesn't avoid static objects

I am currently working on a tanks game, every works fine in the enemy ai but I don’t know how to script the nav mesh in order to get the enemy tanks to avoid static environmental objects. I’m mostly a modeller/animator so I’m new to scripting

Hey, you dont have to script the nav mesh. All you have to do is set the objects that wont move during playmode, to static, and then bake your nav mesh from the navigation tab. Your tank should now recognize and avoid your environmental objects.

Take a look here. I’m pretty sure this is what you want. You do not need to implement any code unless you want to custom your character (tank) behavior. If you have any problem just mess me. :smiley:

Sometimes you will face with the “push” out other tank behavior when you faced that case, take a look here, the avoidance priority

Hope this help, cheers!!!