Hi there again!
I’m making a racing game AI, which is starting to take shape. The only problem is that it works using Loc as the main acceleration.
This is my problem- I want dynamic as it (the AI cars) will have inertia as they start and not begin with a set velocity. I dont use dynamic as when the AI turns (using rays and radar) the inertia is too much and the AI cars bump into the sides of the track.I have tried making a primitive brake (a ray/radar with a large opposite force) but the problem of inertia still comes back. I have also tried side forces and force field constraints with little success, and setting the AI to rigid body with anisotropic friction does nothing.
So I have a choice- use Loc and have nice handing AI that starts like a bullet, or do I use dynamic forces that are nice, but make clumsy AI?
Can anyone suggest anything else I can try using my approach? I have considered a racing path Fcurve/IPO but it feels like ‘cheating’ in a way and is less ‘random’. Is it possible to dynamically alter the Loc speed (logic or python?).
Ive had a node based version that has similar problems with dynamic forces, but behaves itself when the AI uses Loc for speed.
Ive attached what I have done so far- its a bit of a bodge as this is just proof of concept. This version splits the track into left and right which are detected by various rays and radars and the AI turns accordingly. If anyone has an AI like this that works I would love to know what makes it tick!
Thanks for your help
Paul
Attachments
auto_steer5.blend (698 KB)