August 2018
Intermediate to advanced
794 pages
28h 4m
English
The OnMouseDown() method of the ClickMeToSetDestination C# script-class changes the destination of the NavMeshAgent in the Sphere-arrow GameObject to be the position of the clicked 3D object.
The Start() method of the ClickMeToSetDestination C# script-class gets a reference to the NavMeshAgent component of the GameObject tagged Player (that is, the Sphere-arrow GameObject).
Each time a different object is clicked, the NavMeshAgent inside the Sphere-arrow GameObject is updated to make the GameObject move towards the position of the clicked object.
Read now
Unlock full access