Unity : NavMesh (Offmesh Links)

To conclude the articles on NavMesh, let’s talk about Offmesh Links.
If you remember, in the NavMesh documentation there was a part that refers to how Ai moves even if the two points are spaced by an offset, or a difference in height.

I set up this part in our scene

and what I want is to make the AI go from point F to point G.

If we select the other piece of floor and go to Navigation inspector, we have some options about Offmesh links

I don’t touch this options for now, but what I do is restrict the List<> of our points only to E, F and G so we can test a little bit faster.
If we press Play at this actual state, what happen?

As we can see, even if we baked all of the floor, the AI can’t reach other point.
How can we solve this?

The reference to it
https://docs.unity3d.com/Manual/class-OffMeshLink.html

And we attach it to other platform

Inside it, we can add directly two TRANSFORM, one for Start position and one for End position.
In this case we add point F and point G.
And then test it

This is how works OffMesh Link.

--

--

Always in love with programming, even if late (I'm already 39 years old) I decided to follow my dream! We will see how far my passion will take me!

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
Matteo Lo Piccolo

Always in love with programming, even if late (I'm already 39 years old) I decided to follow my dream! We will see how far my passion will take me!