FGear Vehicle Physics (v1.4)

here is a couple of functions you can use:

GetKMHSpeed: vehicles forward speed in kilometers per hour
GetForwardSpeed: vehicles forward speed in meters per second
GetVelocitySize: vehicles overall movement speed in meters per second
GetMaxWheelKMHSpeed: the speed of the fastest rotating wheel in kmh

1 Like

Thanks for the answers, I had already tried those ways without results.
With these functions I obtain the data, but not how to modify it because they are GETS and they should be SETS to be able to change them

You asked how to GET the values. If you want to add nitrous, you can add impulse to the mesh on a timeline or you can increase the torque (I’m sure there is a setter for that) and max rpm etc. There are many ways to do it.

2 Likes

@lazybitgames How to get than on brake, all wheels reduce speed until 0/stop at same time?

I tried with setBraking, maxBrakeTorque and tried with setSpeed in axle(using L-S-D) adding a version of the dominant wheel behaviour in DF_Locked but seems is not a good idea or something else is messing the numbers.

So, wonder, what will be the best way that on brake, all wheels, no matter their actual speed, goes to 0/stop at same time.

Im using L-S-D as differential in both axles with 0.5 strenght.

@lazybitgames any ETA on the next update?

I don’t understand what “get than on brake” means, please clarify.

@gurusaint hopefully before the end of this year

Sorry, I mean on brake.

Actually on turning and brake, some wheels goes to 0 (mostly no gripping rear wheel), while the others is at 50-60 or similar.

What im trying to achieve is, on press and hold brake = reduce wheels speed to 0/stop at same time to avoid one or other wheel goes to 0 sooner than the others to get a more stable braking.

Latest version compiles fine on 5.5. Just had to make changes to the header files of fgear custom collision. I’m guessing we’re getting some goodies in the next update :blush:

that doesn’t sound easy. normally brakes work straightforward, apply a constant stopper torque to each wheel. you would need to apply different brake torques to each wheel based on their speed and traction. do not try to set speed manually that won’t work, the only way is via Wheel.setBraking but finding the correct numbers is no trivial task.

Then i wonder how Dirt Rally 2 does. On brake it reduces wheels to 0 at same time.
I checked and disabled all helpers to full simulation and still does.

This makes on turning or drifting the car follows/continue the curve but slowdowns.

If not, in my case, due some wheel goes to 0, like rear non-gripping wheel, it makes the car break the drifting/curve and turn/rotates in a sharp way.

The best thing i got, for one side is use the v1.62 for breaking(feels smoother):
mFeedbackTorque = FMath::Abs(mWheelTorque) +absLngFriction;
Instead of actual v1.81:
mFeedbackTorque = (FMath::Abs(currentForce) + absLngFriction) * mRadius;

And then edit the braketorque based on carAngle different for each wheel:


Using CarAngleR( Rear) due using the front ones, with much angle it increases.

This is the RallyCross car setup on the game:


One idea i had is maybe on brake reduce with some fast lerp the Diff Strenght from 0.5 to 0 and similar stuff trying all wheel params gets the same as possible on brake.
RallyCross cars seems not have ABS(seems they are banned), i tried to remove and wheels got locked sooner but still there is a difference than can cause some bad behaviours in some scenarios.

So, any chance to support L-S-D Braking too? like in Dirt Raly 2 screenshots?
On braking > Different strenght than driving.

And maybe some slider to set the time, 0=suddenly or X=gradually.

unfortunately it won’t be in the next update, I can hardly find the time to add 5.5 support this month.
also this l-s-d breaking concept sounds like made-up for game physics, is there such a thing in real world? I mean there are locking systems based on electronic brake control but afaik they’re used for traction control not braking.

Hi, is there any tutorial for sound configuration?
I hear it very arcade-like, it’s not like FMOD

Ive been doing some research and asked ChatGPT and got this:

It looks that yes, it happens on real world too and have lots of customization to change differential strength on braking, pressure braking, steering,etc…

There are many tutorials on YouTube on how to create a sound system for vehicles using Fmod, Metasound or the default Unreal sound system. The plugin provides all the variables you need to drive the sound system, so you just need to replace the Unreal Chaos/PhysX vehicle variables indicated in the tutorials with the corresponding Fgear ones.

@lazybitgames
Is there a way to make the tires bounce less? On my vehicle (offroad open wheels) it is as if the tires are extremely inflated.
I tried some changes to the suspension, but the result is not good.
I saw the option to control the psi on MF6.1 tires, but couldn’t notice a difference.
Maybe you have an option that I haven’t seen, if not, I would like to suggest implementing it in a way that the tires absorb part of the impact before the shock absorbers.

there is no real tire inflation in fgear, the option in mf6.1 only effects overall tire friction.

if you experience bounciness it is due to suspensions, check Relaxation Damper and “Suspension Relaxation Downforce” options.

Thanks, I’ll try to fine-tune these properties.

Besides the Differential Strength,

For braking i found this ones that are what im looking too:

  1. EBD (Electronic Brakeforce Distribution)
  2. CSC (Corner Stability Control)

Full explanation here:

thanks

CSC sounds like ESP but EBD can be added in the future versions.

1 Like