I wave been working through a YouTube tutorial series using the Car packages in the standard assets. It was quite good until I got the Tutorial 6 when an error was introduced and so had to start modifying the project quite a lot to eliminate it.
And at tut 7 another error was introduced and although the script in the tut worked and the car was following his own waypoint system, there was an error occurring every frame. So I started looking at how to use the Waypoint AI system for the enemy car - and I couldn’t find any video on YouTube or on the forum that answered my question.
Now in the CarWayPointBased prefab there two script that are calling objects that I don’t know where they should be pointing too to solve the errors:
In the “Car AI Control” there is a Target object that needs to be set in the Inspector what exactly should it be pointing to?
In the “Waypoint Progress Tracker”, there is a Circuit object what should this be set to? And furthermore there is also a Target Object as well what should this be pointing to?
To anyone who can help here is a big thankyou in advance!
I have been trying to figure this out myself, quick question though… I have setup the Waypoint Circuit for my game, but the AI won’t follow the circuit. Do I need to set some specific target in the AI Controller Component? Here is what I have so far:
And…
Oh and yes, I do have a Car Controller attached to the AI as well. The Waypoint Circuit is on a separate game object from the AI itself. Please help, thank you.
Here is what I have tried: - I set the first Waypoint (W1) as the target in the ‘Car AI Control’ Component. The AI drove to the Waypoint then circled around that one point. - I set ‘Car AI Control’ component target as the Waypoint Circuit Game Object (The Parent Object of all the Waypoints) and the AI does the same as the previous test. - I set the ‘Car AI Control’ Component target to None and the AI just stays there not doing anything.
Am I forgetting something? I looked in the scripts comments, but didn’t find anything. I also looked through the guidelines, it says to view the ‘Waypoint Circuit Guidelines’ but there aren’t any documents named that?
Oh I forgot to mention this earlier but I read the part about the 'View the Waypoint circuit guidelines…" in the ‘Car Guidelines’ document:
I set the Targets on both the ‘Waypoint Progress Tracker’ and ‘Car AI Control’ to the first waypoint (W1) and then turned of the ‘Smooth Route’ option in the ‘Waypoint Circuit’ Component (which is on the ‘Waypoint Circuit’ game object).