Point & Click to Move in Unity — Part 1: Player Setup

Setting up the nav mesh system

Rusben Guzman
2 min readNov 1, 2021

Objective: add a nav mesh system in the scene.

The first step was to set the main camera in the position for our game.

In this game I have an object called FloorCollider. Is just a custom collider that covers the movement area for the player. In order to bake it we have to go to windows > navigation and with the object selected we have to select the option “bake”.

Next, in the scene I created a primitive capsule and called it player to test the functionalities.

We have to add a Nav Mesh Agent component to this game object.

And we are good to go!!! The player is ready to use the nav mesh system. When we enter in play mode you can see the player is attached to the floor and only moves in the defined area.

--

--

Rusben Guzman
Rusben Guzman

Written by Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.

No responses yet