Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Racing AI around Spline

I am trying to create a racing AI which will use Rigidbody physics for movements.

What I am trying to figure out is how to make the Race AI opponents to move around the spline like some AI will be on the left side of the spline and some will be on the right and not on the spline. Like any NFS game.

More details, I am not using any wheel colliders. AI will use one big sphere collider for handling collisions.

That's a pretty complex question. I have never done a racing AI, so I can't help much, but what I can say is:
I guess that in your AI logic you have a way to specify what direction/point to steer towards. If that is the case, then you can use the following methods to get points/directions related to the spline:

Combining these methods, you can define points that are close to the spline but not on it.

I hope this helped
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
Thumbs Up variable width and branching from main track for racing AdAstra 4 9 08-09-2022, 12:08 PM
Last Post: _Aka_
  Force spline normal to be always world up GameJazz 12 21 08-08-2022, 01:20 PM
Last Post: _Aka_
  Gap between spline mesh segments Beaver_Boy 8 17 08-06-2022, 12:11 PM
Last Post: _Aka_
  How to stop spline refreshing when a control point is deleted or removed? Beaver_Boy 4 6 07-23-2022, 11:24 AM
Last Post: _Aka_

Forum Jump: