Suggestions and help with car path finding


#1

Hi, I’m on the pro version.I have a huge 3d world and from my understanding Recast Graph is the best for this case.Please correct my if I’m wrong.I’m also using rcc package from asset store.Which gives me ability to change motorinput,brakeinput,steerinput which will cause the car to move using a rigidbody.The problem is RichAi script is too complicated.I need to know the next point position towards me and change my input based on that.


#2

Hey, you might find this other thread interesting (re. car pathfinding)


#3

Hi

You might be interested in https://arongranberg.com/astar/docs/custom_movement_script.html.
None of the included movement scripts in the package are intended for cars, so you would have to write a custom one.


#4

Actually I have already written an script by that article.But rich ai script is so smarter I wanted to get the next point on the blue line and that’s all I need.You have any idea how to do that?


#5

You can get the point using ai.steeringTarget


#6

That’s exactly what I needed Tnx Aron.These scripts are amazing got my car ai working.


#7

By the way how do I force it to find a path forward the card sometimes it finds it from the back of the car.


#8

There might be a better / more official answer but I suspect one could write a custom PathEndingCondition that declines nodes (or perhaps paths starting with nodes) ‘behind’ the car.
HTH


#9

That’s nice could you do that?