Getting the waypoint coordinates
Before we start creating waypoints, we first need to decide where to place them on the map. Therefore, we need to find all the places where our Pandas change their direction. In this simple map, they are located at all corners of their path. In the following image, they are indicated by the red dots:
As we can see, there are 11 and we need one waypoint that is on the cake in the map. This final waypoint is the finishing spot, where the Panda has succeeded in his mission to steal a big bite of the player's cake.
Now that we have spotted them, we need to take note of their coordinates on the map. A fast way to do it is to drag the Panda Prefab around the map in the Scene view and then take note of the position of our waypoints. In this case, we could obtain the following data:
Waypoint number |
X coordinate |
Y coordinate |
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|