August 2018
Beginner
334 pages
10h 19m
English
It's important to take into account the order in which the nodes are linked in the inspector for the path to work as expected. A practical way to achieve this is to manually name the nodes with a reference number:

Also, we could define the OnDrawGizmos function in order to have a better visual reference of the path:
void OnDrawGizmos () { Vector3 direction; Color tmp = Gizmos.color; Gizmos.color = Color.magenta;//example color int i; for (i = 0; i < nodes.Count - 1; i++) { Vector3 src = nodes[i].transform.position; Vector3 dst = nodes[i+1].transform.position; direction = dst ...Read now
Unlock full access