NavMesh OverWorld Map System for Unity 3D

For the NavMesh OverWorld Map System to work, you need 4 main components: a Main Camera (camera), an Overworld Map (map), the Overworld Goals (goals) and NavMesh Path, and finally, the NavMesh Agent or Playable Character (character).

The Camera it´s accompanied by a “look at objective”, which serves as the attention point for the Character. This is the point to where the character will always look at, centered between the Map and the Camera.

The Goals are made of the various objectives to where the character will access traversing the path. This Goals will be the Access point to unlocked levels, hidden treasures and enemies or whatever you like. You can put as many Goals as you need, keeping them consecutive and always on touch with the path mesh.

Moreover, the path needs to be made by a model realized in some other program, Blender, some Autodesk, etc. It has to possess an adequate width, enough so that the character can traverse every turn of the way. You can switch the one in the tutorial asset with whatever you like or make.

To make the Map,you only need a 2D image, nothing too complicated, but it is posible the same model for the path serves as the map, just add a cute design for its application as a 3d enviroment. In the example asset, I used a simple 2D image, deactivating the Mesh Renderer component of the path gameobject, just for simplicity sake.

The Character is made of the left and right Sprites, which will be the graphic being displayed as the carácter traverse the path, you can add whatever design you want. In my case, I used a Sprite Renderer because mine is a 2D image, but you can use a 3D model, it´s up to you.

When you switch the model I provide for the path for your own, you need to take care of the regeneration of the NavMesh, which will be made through the Window Navigation.

Una vez abierto, se necesitará seleccionar el GameObject con el modelo que se usará para hacer el Path, en este caso mi NavMesh Path. Se deberá establecer los parámetros del NavMesh Agent, como su Radius, Height, Slope, Step Height, todos ellos útiles para permitir una adecuada navegación del Character por el Path. Cuando se termine, bastará con oprimir el botón Bake, e instantáneamente se creará un área azul en todo el modelo del Path, debe cuidarse que el área azul sea completa y pase por cada rincón, si en algún momento corta y se descontinúa, será necesario reducir el Agent Radius o aumentar el grosor del modelo, de lo contrario, no se podrá crear el NavMesh Agent y no se completará la creación del NavMesh System.

Finally, you need to créate the NavMesh Agent, just add to the selected GameObject the correct component. You will need to set the parameter you used for the path or viceversa.

This same gameobject will have the provided Scripts “Asset Nav Mesh Move To” and “Eyes On Player”, , adding the correct GameObject in its correspondent place:
Goal x slot- The selected goal in that order, if you need more, just modify the script for that (instructions inside the script).
Sprite right/ left- Just add the gameobjects that will comprise the character model, if you are using a 3d model, you may need to modify its facing direction with some other method than that I used here (if you need an example, tell me and I can upload another tutorial, it can even touch on mecanim if you need it).
Target- you can put here the object that will keep the carácter facing the right direction.

And that´s all! Just click Play and enjoy the game!

Don´t forget to check out the Live Demo and the download Itch.Io page!…

Live Demo NavMesh OverWorld Map System

Published by

Mary D Kidd

Una misteriosa creativa dispuesta a dejar sus ideas salir y tomar control del mundo. Preparada siempre para innovar ;D

Leave a Reply

Your email address will not be published. Required fields are marked *

Transcribe NavMesh OverWorld Map System for Unity 3D

Your email address will not be published. Required fields are marked *

*

*