[Unity 5][c#] car pathfinding AI solution?

Опубликовано: 25 Октябрь 2024
на канале: Arvydas Andrius
631
3

hello, this is my solution that i working for car AI using unity pathfindinding + waypoints, car based on wheelcoliders and default physics engine.
//////////////////////////////////////////////////////////////////////

i going to sell it on unity assets store, but if someone would like, they can buy now directly from my. they will obtain redeem key for assets store to get latest version for free.
//////////////////////////////////////////////////////////////////////

so far without any coding my script allow user to:

make racing car for sprint/circuit
follow and smash to target/ for example player car
find a way from labyryinth
//////////////////////////////////////////////////////////////////////

the DEV who will use it, at this version are able to:

inside inspector window:

set array of transforms as waypoints

set repeat circle or stop on last way point with enum(drop down menu)

set to track one dynamic object (moving player) or array of waypoints

set speed, top speed, brakepower and similar basic car options

front wheels actually rotates to a direction AI turning, this is the wheel collider rotation vector values passed on wheel mes rotation vector
//////////////////////////////////////////////////////////////////////

for future updates:
graphical waypoint representation
brake zones
particle effects while tires slip
mobile touch inputs (or i sell my touch inputs separately later)
//////////////////////////////////////////////////////////////////////

for reference its only one script writen in c#.
i use structs to categorize some options inside isnpector for beter user experiance :D this way you dont see functions you don't need, less mees since you get familar with it


for those who interested to see inspector map this is screeshot

►/▼

https://drive.google.com/file/d/1qPNH...