NavMesh agent

We're pretty much done with setting up our super simple scene. Now, let's add some AI agents to see if it works:

  1. We'll use our tank model here. If you're working with your own scene and don't have this model, you can just put a cube or a sphere entity as an agent. It'll work the same way:
Tank entity
  1. Add the Nav Mesh Agent component to our tank entity. This component makes pathfinding really easy. We do not need to deal with implementing pathfinding algorithms such as A* anymore. By just setting the destination property of the component during runtime, our AI agent will automatically find the path itself.

  1. Navigate to ...

Get Unity Artificial Intelligence Programming - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.