Hi, I’m working on a project where I think I need 2-3 arrays. All of the arrays will consist of waypoints. The Player will be mainly following the waypoints in the 1st array, but circumstances may cause the Player to be “diverted” to a waypoint in the 2nd or 3rd array.
Is there a way to follow waypoints from multiple arrays? And if so, can the following move of the player be referenced (started) at the point he left the 1st array?
I’m using the following to move my 2d Player:
transform.position = Vector2.MoveTowards(transform.position, waypoints[waypointIndex].transform.position, moveSpeed * Time.deltaTime);
Example: Car driving down the street, makes a wrong turn after the 5th block. He turns around to get back to the main street before continuing on his path.
Thanks in advance for any help