To demonstrate, I added a cube to the sedan and it also started jumping around like the tank.
Naturally, I can’t just have a simple box as the vehicle collision for my project so upon testing, I realized that the sharper the angle of these boxes is, the more chances of it getting affected. So at 90 degrees, it’s completely affected, at 45 degree it’s hardly affected.
If this can be fixed code-side, then great, otherwise, I’ll have to rework all of my vehicle collisions to be rounder instead of boxy
yes, as I have said it does happen in unreal 4.27 but not in 5.6 in the context of this test map.
fgear does nothing special with the physics body, we calculate the forces and apply them nothing more.
@lazybitgames Have some question related to ABS, which actually uses deltaV scaler,
In big update, Is gonna be improved/re-implemented too?
I mean, via BrakeTorque modulation / pulsing, per wheel?
For shorter stop distances + reach peak slipRatio without mLngSlipOverride hack.
Trying to avoid hacks, so disabled ABS (set to 0) and implemented my own EBD system.
Reduces BrakeTorque per wheel/axle to keep stability + avoids wheel lock (via SlipRatio/Angle)
For optimal slipratio im using the actual hack due this ABS pulsing system can be tricky.
Also for big update, if possible, in transmission:
Able to set different “change time” for upshift/downshift and enable/disable revmatching individually.
For rallycross cars setup, downshift is usually near double slow and upshift no need revmatching.
hi @lazybitgames, I’m making an AI system , I needed the car to toggle physics on/off based on distance , just like we can do on chaos vehicles (calling set simulate physics on the mesh) , but this doesn’t work on fgear , do you think it’s possible to do that on the car body mesh?
also is it possible to change a skeletal mesh in runtime and still have functional wheels? cuz i’m calling set skeletal mesh asset and the wheels dont have collision anymore(same skeleton names) @lazybitgames
hi @lazybitgames , maybe I am missing something here.
The engine RPM seems off to me, as the calculation is clamping the feedback rpm between mIdleRpm and mLimitRpm (if the engine is running), the sign will be 0 and will cause the delta rpmVel2 to be 0 as well.
This will make the mRpm value be equal to mIdleRpm as long as the feedback rpm is below mIdleRpm.
If mLimitRpm is 9000 and mIdleRpm is 6000, even if one is throttling and the vehicle is movng, the rpm is not changing and still equal to mIdleRpm. Only if the feedback rpm is greater than mIdleRpm will the rpm raise.
Should it not be that mIdleRpm is the start and any throttling will add up on this values / make it raise?
only calling set simulate physics wouldn’t work for any game unless it’s too basic.
I had implemented this in a game project a couple of years ago.
you need additional steps like sleep/wake, hide/show, enable/disable collision, enable/disable ticks etc. you may also want to reset the physics state like resetting the linear & angular velocities.
you mean swapping the vehicle mesh, I don’t think it’s possible out of the box.
you would need to rerun some of the steps in vehicle beginplay to make it work.
if the idle rpm is positive the vehicle can not come to a stop without stalling the engine or the clutch should be disengaged.
for instance the RC car has zero idle rpm so it can stop and the engine also stops.
a vehicle with 6000 idle rpm could go like 50kmh with the initial throttle, anything below that would stall the engine.
if you disable auto clutch the vehicle will try to go with the idle speed unless you operate the clutch yourself.
stall assist can fight with this behavior and prevent a stall by partially disengaging the clutch.
Maybe I have written the question a bit confusing with the example values.
What I actualy meant was: If I do throttle I do expect the rpm to increase, but it does not, only after the feedback rpm is greater than the mIdleRpm does it increase.
it is the correct behavior when engine stalling is off, normally the rpm could go below idle and may stall the engine. to stall the engine auto clutch should also be off.
btw this behavior of the engine & clutch is reimplemented in my r&d branch, the rpm clamping will be optional.
unfortunately the development is all over the place and I can’t say what will or will not make it.
and it’s hard to tell how long it would take since I’m not working full time on it.
I was thinking to add some damping too, but original not had, maybe due this is applied before comp/relax dampers so not needed?.
Btw, just sharing in case it helps, also anybody can test easy, just disable the original code and paste this one to test how car reacts and if works better for their project, if not, just remove and enable the old again.
EDIT: Now trying using torque.X , from overturning applied to chassis that seems it should be the physical correct way.