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

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.

--

--

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