I want to create a path that a car has to follow. How can I do this?
I don’t think there’s enough information to follow here, but I would suggest having an array of nodes that make up the available paths. You can make a list or array of Vector3 positions and have your car move between them.
A simple way that I implemented something like this was to have a Vector3 list and have the object move toward the Vector3 at list[0] and simply remove the item at 0 until the list size was 0.
I had an A* path finding algorithm look through Vector3 positions in a maze and find a route between 2 points for my virtual mouse to follow. I’m surprised I threw that project out… it was my only successful implementation of A* lol.
I would use a spline tool from the asset store. I would create two splines. One would be the path the car is supposed to follow and the other would be a perpendicular spline that allows it some leeway on the road (such as for passing other cars).
ok thanks