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?
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.
You would of course have to devise a method to get the appropriate waypoint (GetWaypoint methods). You couldn’t just use some incrementing counter as it would most likely point to wrong location. You could loop through the appropriate array (left or right side in my simple example) and find the waypoint that is closest to your vehicle.
You could store the index where this closest one was and continue from that, if you need to get more waypoints on the same path.