If we start from where I left off in part 1 we will see that at the short ledges the agent is forced to go around and always use the steps if it needs to get to the other side.

Adding the ability to jump down is fairly simple. Go to the Navigation panel and under the Bake section, change the Drop Height value to 2 and bake the navmesh again. Now the value of 2 works for this level because of how high my ledge’s are. Depending on your game you may to change this value as well as the Jump Distance. Please check Unity’s documentation to see what will work best for you.

Now after the bake completes you will see some off-mesh links have been generated (The blue circles with red arrows). Off-mesh links are paths that have been designated for the agent between non-traversable sections of the navmesh. Thinks of it as areas that you not normally just walk on. Go ahead and play the scene and you’ll notice that as you move the target around the agent will jump down from the ledge to reach the target.

You may notice that the agent will only jump down from the ledges and will go back to using the stairs if it needs to go from the lower level to the upper level. This is the one drawback of the basic Unity navmesh, it will only allow the agent to jump from a higher level to a lower level. This might work for some games but for this tutorial we want to be able to have our agent go both ways and we’ll accomplish that by creating a custom off-mesh link.

Creating Custom off-mesh links is pretty simple. Start by creating a plane where you want the agent to be able to jump from(the bottom) and then create another plane on the ledge where you want the agent to be able to jump up to(the top). I also had to scale the Unity built-in plane down to 0.25 to fit this size.

Now select the bottom plane and go to Component -> Navigation -> and select Off Mesh Link and you will see that the Off Mesh Link Component has been added to the plane. Then in the Off Mesh Link component associate the bottom plane as the Start and the top plane as the End. We will want to leave Bi Directional and Activated checked.

Now go ahead a bake the navmesh one more time. You will now see an additional off-mesh link created between the two planes as well as the red arrow pointing both ways indicating the bi-directional movement. Now when you play the scene the agent will be able to climb up the ledge at that location. From here we would want to put some more custom off-mesh links along the rest of the ledges so that our agent has a more than just one option to climb up.

Hope you enjoyed these tutorials and hopefully it helps anybody interested in getting some simple pathfinding into their game!