When I started with my game I tried using the NavMeshAgent for my AI but I couldn’t even get it close to what I wanted eg. The tanks don’t move at a constant speed, the move before they’ve turned to face the right direction etc. Quite simply all I want is for the tanks to move around the level randomly, so I followed the A* pathfinding tutorial by Sebastian Lague and they work fine but the programming is getting pretty hard now and now I’ve got new problems that are really hard to fix. What’s the best way to get simple AI for a tank (Just the movement, not turrent), Can I achieve this with the NavMeshAgent?
Hi,
NavMeshAgent is used in combination with NavMesh to gives the AI knowledge about the scene and how to navigate it. It’s simply a solution for finding a path from A to B.
If you want your AI to behaves and reacts to different situation, you might be interested by Behaviour Tree. Coding AI exclusively in C# become harder as your AI grows in complexity.
Please have a look at Panda BT, it’s a script-based Behaviour Tree engine. It will helps to you to organized your code and keep your high-level logic clear and understandable, therefore less likely to contain bugs.
This is the Panda BT website: