FGear Vehicle Physics (v1.4)

Thanks, I’ll try to use only line traces, most of the time with 3 or 5, I think it’s enough to not pass through fences and other vertical obstacles, when in more technical areas I change to 9x3 (or as many as the device supports), and I also won’t use rocks with an inclination greater than 75 degrees.

I think a combination of convex and line trace would be interesting, just a few horizontal and diagonal line traces would be enough to prevent the wheel from passing through vertical obstacles (like in the video). In any case, it would be heavy for mobile devices, right? But it would be interesting for those who develop for PC.

Always wanted to create some sort of racing game but fell short of a vehicle adjustment screen such as this, if you dont mine me asking, how were you able to create the ui/menu screen that allows for vehicle adjustments.

Thats not mine, is from Dirt Rally 2. My game still not have any game UI. Btw, if i remember well, on marketplace there are some “menu” plugins/bps and other stuff that should make it easy, check them before do your own system.

@lazybitgames is it possible to allow further customization of the trace channel type? Now you can only set the custom channel but you cannot customize what the individual responses are.

you mean exposing the FCollisionResponseParams, yes I can do that in the next update.

1 Like

@lazybitgames Differential Lock/Open are correct? i think they are switched.

In theory open means each wheels goes freely but:
if (mDifferentialType == FGearDifferentialType::DF_OPEN){
mLeftTorque = mRightTorque = getOpenDiffTorque(); }

And locked should be they goes at same speed but it does the opposite. ¿?

Then for L-S-D there are two ways to manage this, with Differential Strenght or by Lock %.

I guess if change the conditions open/lock, on L-S-D i should change the order for open/lock so Diffstr gets working as it should, or leave as it and change diffstre by locking%.

What you think?

open diff transmits the same amount of torque to both wheels but one of the wheels can steal the power if it’s on slippery surface. locking diff(l-s-d) transmits more torque to the wheel that has more grip. this is correct in code so I don’t think they’re inversed but none of these enforce any speed on the wheels which is a limitation of fgear’s differential implementation. the only speed enforcement is done with the locked diff. if you check UFGearAxle::postWheelupdate, you can see that the wheel with the most grip enforces the rotation speed.

in short the differentials are not broken but they’re not perfect either. the reimplementation of the drivetrain is a topic of a future fgear 2.0 version…

2 Likes

Ok thanks for clarify! Then i guess i need to find a better aproach.

Im trying to replicate the L-S-D Driving, Braking and Preload from RallyCross cars. For driving is the actual DiffStrenght.

For L-S-D Braking just added to DiffStr with a lerp + brake pressure for more smooth transition.

This is added to actual diffStr and works as expected.
float lsdBraking = aFrontWheels ? aBraking *0.1f : aBraking *0.2f;

But no idea how to mimic the L-S-D Preload then.
It should be activated when little or no torque is aplied to avoid lock the wheels.

In Dirt4/Dirt 2.0 is represented in 20.00 N-m, so it should be applied somehow to mWheelTorque in UFGearWheel::updateWheelTorque() ?

Im a bit lost, if possible to request for next update a L-S-D Braking & Preload under DiffStrength at Front/Rear axle will be great.

This is the car behaviour im trying to achieve, but due lock wheels, sometimes front or rear the drift or fast zig-zag is unpredictable.

to mimic a differential preload you could add/subtract a certain amount of torque to the differential output in UFGearAxle::getLockedDiffTorque.

I have no plans to do major simulation changes in the fgear 1.x branch, I just don’t have enough time right now. when I get the time my plan is to work on a possible 2.0 rewrite but that is unlikely to happen in the short term.

1 Like

Will version 2 be a separate product? Would I have to buy the plugin again?

Having in mind the 2.0 will be a rewrite, probably with wheels collisions and other features i guess will have to buy the new one or maybe with some discount if we already got 1.x .

it’s a bit early to talk about it but it’ll probably be a separate product that 1.x owners will be able to get with a discount. it won’t be a simple rewrite but an overall redesign of the simulation and will have some new features.

4 Likes

@lazybitgames after putting pooling on the back burner for months, I attempted it again and I am still having issues pooling Fgear vehicles. When tick is re-enabled on the Fgear mesh, it is not depooled to its original position. You mentioned a while back about a vehicle.substeptick function but I don’t see it anywhere. I’ll definitely be upgrading to a 2.0 version but any insight on how to tackle this would be appreciated. Also is there a way to override waking up vehicles that are in close proximity to each other? When vehicles are pooled, I would like them to stay sleeping until they are depooled.

I’ve personally implemented vehicle pooling with fgear years ago with unreal4 so it is possible. I don’t understand what your problem is, you need to basically re-activate everything and put it back.

you can manually sleep or wake a vehicle by calling vehicle.sleep/vehicle.wake functions but even if you make it sleep it may wake back up due to any collisions so you can’t force a sleep. try calling sleep, disable all ticks including all components, disable collision etc. and revert everything when you want to respawn a vehicle.

1 Like

Noted. Thank you. Also please for the next update, if the vehicle has no physics asset, just throw a warming screen instead of crashing the editor completely.

@lazybitgames My client car has a visual glitch: Its floating and shaking up and down only on server side , but when I press F8 to go to spectator mode it stops glitching for some reason , when I enable server authoritative the shake stops but the wierd offset doesnt

(post deleted by author)

are you sure you’re testing it right, it says standalone in your screenshot.

a client in client authoritative mode simulates locally so it can not shake or anything, other clients may be… make sure your root bones are placed at zero(0,0,0) origin.

1 Like

it was the root bone location man , tysm :slight_smile:

@lazybitgames hope you and the team are doing well. Any suggestions on how to get a delegate when the vehicle is in reverse? Right now, we get one once the gear is changed. Also any update on when the wheel trace channel can be individually filtered? Cheers