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)
your idea might be good, but it doesn't make sense with such physics of wheels
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
@MVC Yeah, the brakes themselves cannot be modified, but you can make the wheels rotate in reverse with varying force
@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
@MVC variables represent numeric values, unless we're talking about two completely different things
@MrGreen the imput brake accepts only a numeric value , it does not accept variables
@An2k not quite, as both wheels turn the same, but it does accomplish something similar, i suppose
@MVC
Brake
and a combination of the wheel's local variablesIm 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.
is it like ackermann / anti-ackermann... on steering FT?
This is neat!
T
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?