06-27-2009, 03:58 AM

Don't know about anyone else, but I find the way this is set up at the current time to be wholly annoying, and yet with anything apart from a multiple-turn wheel it's necessary to achieve a reasonable line at speed.

The problem comes when you happen to enter any kind of situation which requires a greater steering range at speed (eg. drifting) - you're left with very little lock angle and will tend to enter an uncontrollable skid in one direction or the other.

I had another dive into the source code to find where this is worked out, grabbed the current algorithm and crunched some algebra until I'd worked out a formula that looked reasonable.

Diff (For obviousnessosity):

Now, you can probably tell from looking that this increases the complexity of the damping algorithm by a differential magnitude based on the steering value.

Or, in layman's terms, the speed sensitivity is modified based on both the speed of the car and the amount of steering used such that at most speeds you'd expect to need full lock, it's still available in the same place, however smaller amounts of steering will be dampened.

I applied it with a nice quadratic curve to make it feel like a more direct transition from fine to gross control (even though it's actually less direct).

If you're still lost, here's some graphs to give a representation of what it does to your steering controls:

As you can see there's a lot more lock available to all speeds.

I've tested it on a few cars (GTV6, G4, Z06, 360) and from my perspective it maintains a much smoother drive while giving back control in a sliding situation.

There may be nicer algorithms and there may be more efficient ones. This is by no means the be all and end all of the suchlike. I'd encourage people building from source to try it out, though

Cheers,

fudje

The problem comes when you happen to enter any kind of situation which requires a greater steering range at speed (eg. drifting) - you're left with very little lock angle and will tend to enter an uncontrollable skid in one direction or the other.

I had another dive into the source code to find where this is worked out, grabbed the current algorithm and crunched some algebra until I'd worked out a formula that looked reasonable.

Diff (For obviousnessosity):

Code:

`Index: carcontrolmap_local.cpp`

===================================================================

--- carcontrolmap_local.cpp (revision 2505)

+++ carcontrolmap_local.cpp (working copy)

@@ -590,8 +590,9 @@

{

float ratio = 20.0f;

float coeff = 1.0;

+ float ssco = speedsens*(1-pow(val,2));

if (carmph > 1)

- coeff = ratio/(carmph*(0.1+speedsens*2.0));

+ coeff = ratio/(carmph*(0.1+ssco*2.0));

if (coeff > 1)

coeff = 1.0;

Now, you can probably tell from looking that this increases the complexity of the damping algorithm by a differential magnitude based on the steering value.

Or, in layman's terms, the speed sensitivity is modified based on both the speed of the car and the amount of steering used such that at most speeds you'd expect to need full lock, it's still available in the same place, however smaller amounts of steering will be dampened.

I applied it with a nice quadratic curve to make it feel like a more direct transition from fine to gross control (even though it's actually less direct).

If you're still lost, here's some graphs to give a representation of what it does to your steering controls:

As you can see there's a lot more lock available to all speeds.

I've tested it on a few cars (GTV6, G4, Z06, 360) and from my perspective it maintains a much smoother drive while giving back control in a sliding situation.

There may be nicer algorithms and there may be more efficient ones. This is by no means the be all and end all of the suchlike. I'd encourage people building from source to try it out, though

Cheers,

fudje