FGear Vehicle Physics (v1.4)

Im trying to implement “Clutch Kicking”:

I tried changing by Scale, via button for “Clutch Kick” but the difference between 0 and 100 (or 1000) not seems to give the same effect.

So maybe is my car setup or the clutch/rpm how is done are not working as expected, no idea, so let me know, maybe i should use another workaround for same effect?

@lazybitgames , would it be possible to make the white wireframe wheel in Debug adjust to the forward offset (as it already does with the Rim offset)? I’m fine-tuning the wheel offset relative to the kingpin rotation with the UFGearWheel.setLateralOffsets function, but it’s harder without visual feedback.

you just misinterpret what clutch state and clutch scale are. the real clutch value is clutch state, clutch scale is an artificial value that should be rarely used like in the clutch assist case. there is no bug there.

with a steering wheel and pedals clutch kicking should work naturally. if you want to trigger a clutch kick in a realistic manner then you should be altering the clutch state not clutch scale.

if you want to observe what clutch scale does you should use a smaller number like 0.2. 1.0 or more might behave the same in most cases. reducing the clutch scale might also behave similar to a clutch kick, it would let the engine revup without getting slowed down by the wheel speed.

2 Likes

yes, it looks I have forgotten to apply other offsets to the debug view. adding this to the todo list.

Thanks!

@lazybitgames In the same way is possible get the RPM of different axles, is possible get the “mLngFrictionForce” for each axle? or the friction of each axle?

Using the TorqueSplitter as Center L-S-D works fine as real ones due they are based on RPM differences, les RPM usually means they have more friction so more torque is sent to that axle, but there are some exceptions where the torque is sent to the wrong axle like in real life. In that cases driver skills can manage that, but due here we have access to friction values, better using that for 100% accuraccy, but no idea if possible and how. ¿?

we use feedback torque for differential calculations.
for each axle you can call axle.getFeedbackTorque()

I was thinking in some way to get “mLngFrictionForce + mLatFrictionForce” of each axle, to get the total friction, then send more torque to the one with more to mimic what a Center L-S-D should do.

Will try then with FeedBackTorque to see how it does.

Hi.. just realized that FGear remote car’s wheel does’t rotate. The server (which does all the physics) rotates ok.
Any pointers where should I look for fixes?
I tried looking at FGearReplication.cpp which I think is where all the replications happened, but the wheelanimation is updated only inside FGearVehicle::tick using UFGearWheel::visualUpdate.

So it maybe that some variables get wrongly assigned or calculated (I have a heavily modified FGear) ands when they get passed to visualUpdate, it doesnt move. So I am looking for suggestions of where to look for to fix the code.

Thanks.

@lazybitgames In the same way we have “Forward Offset” in axles, that changes the X in local position, will be possible add the same but for Z offset?

Actually im doing this that works fine, but better have all in the BP for better setup.

Is to get all cars same setup with wheels position without mess with suspension/preload for each one which can change the driving too.

it seems good to me in the sample project, both with server and client authoritative modes.

we only replicate inputs + vehicle transform and expect the the other components to update locally.

yes, instead of having separate forward/lateral offset etc. we could have an offset vector that transforms in all directions.

1 Like

Is FGearCustomCollision working as it should? Or is something to avoid that will be deprecated into the future?

I import a mesh for a collider but it always use a simple collision one which looks like an obelisk.

I checked the option “trace complex on move”, but still uses the simple collision. ¿?

FGearCustomCollision is not a mandatory class which means you could achieve the same thing by adding a static mesh component and configuring it properly. FGearCustomCollision enforces some settings and assigns a wireframe material by default.

make sure you use “UseSimpleAsComplex” option in your mesh settings.
“trace complex on move” has nothing to do with this.

1 Like

Hi, I am having trouble with managing tire options parameters at runtime. For example, these two functions do work only with beginplay, but what I need is to update these values at runtime using Async tick. Other components functions do work this way, but not in the case of tire functions.

there is an extra step needed for wheel options, you need to call Axle.applyWheelOptions after modifying a variable.

here is a screenshot from the modification sample:

Hi! There is a way to make a dependent suspension (without Antiroll) in BP?

It worked, thanks!

sorry only independent suspensions are supported.

1 Like