Profile image

Free to use FT car steering aid coming up! (and how to use it) [TEASER]

16.4k MrGreen  1.6 years ago

Now, the "Funky Trees SteerFriendly” (FTSF) may seem extremely complicated and confusing, and it is, but let’s break it down so you can use it, too!
Let’s start at the basics, the structure of this formula. It goes something like this:

Input > Magic > Processed Output.

I’m going to first explain what the magic does, then I’ll tell you how I achieved this magic.

What is the internal structure of the FTSF?

The FTSF has two main components:

SBSM:

Speed-Based Steering Multiplier. The faster you go, the less aggressively the wheels will steer. This means the vehicle will keep a more constant turn angle, and more importantly, prevent keyboard players from spinning out when attempting to correct at high speeds.

AVS:

Autonomous Vehicle Stabiliser. When you let go of the controls, the FTSF will attempt to arrest any rotation that is happening at that moment. This feature, again, mostly benefits keyboard players. This part isn’t fully polished yet, but works well enough to be used.

The inner workings

iSteeringInput | Roll

Simply a variable to store which SP var. is used to steer by the user.

cMaxGS | 43 * cMaxGSmarg

Literally the maximum speed (multiplied by a margin) we’ll use Vmax.

cMaxGSmarg | 1.25

A little margin for the max speed so it can be used in other expressions.

cSBSMmult | 100

A multiplier constant used to squeeze the right numbers out of the SBSM.

SBSM |( iSteeringInput * (cMaxGS - GS) / cSBSMmult )

The input gets multiplied by how close the vehicle is to its Vmax. After that the number it spits out gets divided by a multiplier into a usable number.

Don’t be scared, the next one will be a tough one.

AVS |YawRate > -0.01 & YawRate < 0.01 ? 0 : pow( ( 0 - YawRate ), 2 ) / ( ( cMaxGS - GS ) * 1500 )

If the rate at which the vehicle is turning exceeds a certain threshold (in this case 0.01), AVS will take the negative of YawRate, square it in order to make the system more aggressive at high amounts of error (Difference of YawRate and 0). The result of this will be divided by how close the vehicle is to its Vmax, basically the same stuff as SBSM. then it’s just a simple multiplier.

This formula originally used a PID, which certainly was more elegant and efficient, but tuning it was a nightmare so i basically made my own formula which literally inverts the function's input and makes it the response to the input (after some tweaks)

The formulas have not been rendered correctly. If you want to copy them directly, you can go here

  • Log in to leave a comment
  • Profile image
    51.4k MVC

    your idea might be good, but it doesn't make sense with such physics of wheels

    +1 1.6 years ago
  • Profile image
    51.4k MVC

    the brakes in the game are arranged so that a force is created opposite to the direction of movement of the wheel.therefore, when we brake with the wheels turned in one direction, the car shifts to the other side.therefore, there is no point in turning on the reverse gear when braking. in addition, there is no abs simulation in the game and the most effective way to slow down is to completely block the wheels

    +1 1.6 years ago
  • Profile image
    16.4k MrGreen

    @MVC Yeah, the brakes themselves cannot be modified, but you can make the wheels rotate in reverse with varying force

    1.6 years ago
  • Profile image
    51.4k MVC

    @MrGreen in an overload, it is not possible to write anything other than a numeric value to the brake line. we can adjust the rotation of the wheel using foam, but not the braking force

    1.6 years ago
  • Profile image
    16.4k MrGreen

    @MVC variables represent numeric values, unless we're talking about two completely different things

    1.6 years ago
  • Profile image
    51.4k MVC

    @MrGreen the imput brake accepts only a numeric value , it does not accept variables

    +1 1.6 years ago
  • Profile image
    16.4k MrGreen

    @An2k not quite, as both wheels turn the same, but it does accomplish something similar, i suppose

    1.6 years ago
  • Profile image
    16.4k MrGreen

    @MVC Brake and a combination of the wheel's local variables

    1.6 years ago
  • Profile image
    35.3k V

    Im making a system like this too, heres the code if you are interested.


    Activate1 ? (Yaw/2) : (Yaw = 0 ? (TAS < 5 ? 0 : clamp(AngleOfSlip/85,-0.75,0.75)) : (Yaw >0 ? (Yaw/2)-(clamp(TAS/correction, 0, 0.5)) + (TAS < 5 ? 0 : clamp(AngleOfSlip/85,-0.75,0.75)) : (Yaw/2)+(clamp(TAS/correction, 0, 0.5)) + (TAS < 5 ? 0 : clamp(AngleOfSlip/85,-0.75,0.75))))


    Make a variable called correction and set it to 700.
    .
    The way i went about doing it is less elegant but i mean it works.

    1.6 years ago
  • Profile image
    1,182 An2k

    is it like ackermann / anti-ackermann... on steering FT?

    1.6 years ago
  • Profile image

    This is neat!

    1.6 years ago
  • Profile image
    29.5k xNotDumb

    T

    1.6 years ago
  • Profile image
    51.4k MVC

    it is very easy to make abs , but for this you need an input for the brake. and where is this input for the brake?

    +2 1.6 years ago