In my driving experience, the game is very empty at the moment. Like, the roads. I thought maybe it would look better and be more realistic if I had some cars on the road. I thought maybe dijkstra’s algorithm would be the solution, but looking it up, I couldn’t find anything useful.
I have been researching for days on google, the dev hub, bing, and the devforum. Would this be too complex, or where should I start, collision detectors don’t work either.
I am not asking for entire scripts, I just need ideas on how to start.
It must also follow yellow and white lines
Thank you.
I guess you could try pathfinding. (If it’s just a regular moving car.) I’d recommend having the roads have regions, and the car will check if it’s in the specific region, and then it would move forward. You could use math.random to generate a forward, left, or right depending on which is available, and using values within the road, you could say whether it connects to another road, if a left or right turn is possible, and if nothing is possible, you can make it do a U-turn.
(Super simple stuff, take my ideas with a grain of salt.)
Unity? How would this help me? Can you explain?
you watch the video then you use your brain to generalize the logic of the code in the video and rewrite it in lua.