FGear Vehicle Physics (v1.4)

Ok, PowerClutch Scale removed & Stall assist reimplemented without using mClutchScale.

Guess thats why the code in FGear Vehicle //artificial .

-

Btw, i can use mClutchState, It has same behaviour to smooth RPMs, just 1 to 0 values. So i only need to change the code/formula to adapt to “mClutchState” instead of “mClutchScale“.

Maybe the new reimplementation of Stall Assist will use in fact mClutchState? Any chance to check the new code? or any eta for the next update? To know if worth play meanwhile with mClutchState or wait.

it’s using clutch state of course but in a different way. basically when a stall is detected we press the clutch to rev-up and wait until we reach the peak torque rpm(or a custom rpm) and then re-engage the clutch so that we get a bit more power using the momentum of the engine. the next version is still a work in progress and it’s a bit early to give an eta.

Thanks for the reply. Now I’d like to know how I can get the kilometer for each gear ratio. Thanks.

Hi again , @lazybitgames , i’m facing an issue with the physics. I want to use custom collision but to do that i need to set the physics to simulated instead of kinematic , as soon as I do that the center of mass goes to the front of the car, the custom collision works fine but the center of mass is broken , if I offset the center of mass to the center and the car floats like it’s on the moon .

transmission.getGearMaxSpeed
transmission.getMaxSpeeds

1 Like

your video doesn’t tell much.
you can not move the car with a kinematic physics asset so simulated is a must, currently it’s activated from the code even if you set it as kinematic.
center of mass is determined by the physics asset, custom collision will determine the collision response.
there are multiple sample vehicles(sportscar & truck) in the example project, check them out.
wheels have no real collision, they only make physics queries so collision response won’t effect them.

Ok thanks for the info, then will wait for the updated stall assist.

-

After more research seems to get that responsive accel/revs im gonna need a Turbo + Anti-Lag System (ALS) like RX cars.

Guess no plans to add them in future updates? Just to be sure, due to complexity i may hire somebody for that.

This is the idea:

there is no forced induction feature planned for the next update, may be in the future.

Is the ASR working correctly in all scenarios?

In a straight line, just accel, No ASR, the lngslip is around 0-1 in long gears and is good for good traction.

But if you set ASR like 80, the lngslip starts to increase to like 6-8 making hard to reach last revs for upshift.

Not should be the opposite? ASR not should reduce lngslip to get more traction for this cases?

ASR forces maximum traction slip ratio at all times so the slip value increases with the speed but it’s a fake slip value so it’s overall effect should be negligible. I have set the gear-up ratio to %99 in the example project and the vehicle can shift at high speeds. let me know if you can create the issue in the example project so that I can try and identify the problem.

and final gear ratio kmh?

what’s the question, final gear ratio is already used in top speed calculations.

What I mean is how to get the km/h from the “get final gear ratio”?

final gear ratio is part of the speed calculation, higher final gear ratio will increase torque but decrease top speed. you can see the code that calculates top speeds in UFGearTransmission::refreshParameters. replace limit rpm with current rpm and you get the current speed.

Problem was low ClutchState combined wirh ASR, just checked.

Ive been trying anything to get that smooth/responsive RPMs but atm the unique way i found is modulating the ClutchState.

Btw trying some alternatives:

  1. turbo sketch code for speedup revs adding multipliers for each gear, it helps but not fixes and with the con that increases too much the final speed.
  2. Now trying to figure how to add some damper for RPMs in FGearEngine.cpp, like some value that scalates with rpm to see if get that smooth im looking.

Then why if i disable that lngSlipOverride code used in ASR i get better traction that with it?

This code:

you might get better lateral traction but not longitudinal. also depends on how you define traction.
again if you know of a case that I can create in the example project then I can take a look at it.

You’re right, lateral traction.

So if i understand well:

1.- In overrideSlip you increase slip due the intention is push the wheel to produce peak longitudinal traction.

2.- On disable that code, lateral traction is increased due S-A-P
if (mTire->getCombineMode() == FGearForceCombineMode::GRIP)
Less longitudinal traction = more lateral traction available.

Disabled that code because on zig-zag the car behaviour was much better that with it.
But on drifting and real track, some scenarios feels too much traction and unpredicatable.
Other con was the bad behaviour on accel+brake on lower speeds.

Then i need to fix the zig-zag traction in other way.

yes, longitudinal slip effects lateral traction that’s why I’m going to remove this.
I will probably go back to the earlier version of it which is also not realistic but has similar behavior without effecting lateral traction.

I see, well, with this one already are lot of removed/reimplement/redone future changes.

So, i have to ask, any other future changes affecting to car behaviour we should know?

Deprecated/Removed:
Vehicle :: Allow wheel rotation against engine
Vehicle :: DriveAssists :: Front & Rear Anti Roll Power
(Use FGearArcadeAssits one) (May needs a proper Redone)
Transmission :: Clutch Power Scale

Reimplement/Redone:
Transmission :: Stall Assist (Using clutchState)
lngSlip override / lateral traction behaviour

Improve/Checking behaviour
Front/Rear Axle :: Toe Angle

Im missing anything else?