Working with Unity’s Nav Mesh System for Smart AI

Stealth Game & Cinematography

Lets take a look at more detail about the navigation system in unity to create a smart AI.

To make this happen you first need to open a navigation tab so go to Window>AI>Navigation.

Inside navigation, you are going to see four additional tabs Agents, Areas, Bake and Object.

Agents: It is used to setup our default navmesh agent settings which is used by the gameobject to navigate and move around the navmesh. Name is whatever you want it to be and by default it is Humanoid but you can change it to another if you wish to. Radius defines the width of the agent collider, height defines how tall the agent is, step height store the value for how high the agent can step up and Max slope defines the max angle agent can move up on.

Areas: This is similar to the tag of unity that defines a gameobject but in this case, it defines properties of the nav mesh. By default there are Walkable, Not-Walkable and Jump but you can add another 28 other custom tags that defines specific color in nav mesh.

Bake: It is like a play button of your game but here when you bake the nav mesh here, you can then use the nav mesh in your project.

Object: This is where you are going to define the property of your collider object. Here, you can select a collider gameobject in this case FloorCollider and you can define it to static and select the area as walkable. After you bake the scene, you can now use this FloorCollider gameobject as a floor for navigation.

--

--

--

Unity Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

If a robot does the robot.  Is it just dancing?

AI and I: What I’ve Learned So Far

Small Data Versus Big Data — Ethnographic Tactics and Algorithms as Culture

How AI can help your training and your business

Collaborative Intelligence: Bridging the AI-Human Gap

Hang On To Your Meta Hats!

Hang on to your Meta hats, Facebook, meta, metaverse, mark Zuckerberg, Zuckerberg, VR, AI, casey lane, caseylanewords, update, founder, medium

What happened In AI/ML This Week? (25th Jan 2020)

Neil Sahota, Preparing for the A.I. Revolution — InnovaBuzz 343

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Niraj Karki

Niraj Karki

Unity Developer

More from Medium

How to Add Custom Post Processing Files to Individual Cameras in Cinemachine

New Enemy Movement Behavior

Setup AR Foundation in Unity

2D Mobile: Loot System