Steering input into a top down car

Hi,

I have looked at things like OpenSteer and they use a very simple locomotion model where a vehicle can just turn without it moving. I havea top down car, and if I work out a vector from the car to its target - I need to translate that into both forward motion and an input into the motors which attach the wheels to the car.

Now the wheels are fixed to have +/- 30 degree motion, and I am wondering how to do this...

I am work out the vector from car to car, and the angle, and then have to somehow drive the motor. If the car is staionary, with a wheels restricted rotation, the wheel will only ever point to the target if the turn is accompanied by forward motion...

Is there a general approach for this problem...I have tried to just set the motor speed to a fixed positive or negative value based on the angle difference, and am applying a small forward acceleration...It thought this would turn the wheel to its extremes of rotation until the forward motion of the car moved the car round to face the target...but my car just more or less spins....

Any advice appreciated....

Regards

i

Original thread: https://box2d.org/forum/viewtopic.php?t=5658