FGear Vehicle Physics (v1.4)

sharp edges are bad for physics engines, i don’t want to repeat myself but there shouldn’t be that kind of spikes on a terrain in the first place.

you can increase vehicle body inertia or per body velocity calculation iterations to get better reactions but it will not be a solution.

may be you can try some settings from the engine, for ex. if i set “Bounce Threshold Velocity” (in Project Settings->Physics) to 2000 then the collision response feels much better.

Hey! Very cool physics!
I ask for help, show me how you can make the movement of only the right/left side wheels? (for tracked vehicles) Is it possible? I understand that I need to rewrite the code, I just ask you to show me where to start.

anything is possible when you have the code, you can start from UFGearAxle::steeringUpdate.
instead of setting steering values for the wheels, maybe you can set another parameter to tell the wheels to revert or not.

Thanks! We’ve done everything, your code is pretty beautiful!

I have a serious problem. I added 5 axles for the tank. And every time I start the editor, the order of these axes changes. That is, at first, for example, the 5th axis was the 5th in order, when it is restarted it becomes the 3rd, etc.

More details: the indices are changed in the Axles array in the anim blueprint. It would be great if you could manually set the index on the axis. Can you do it? Or at least tell me where to start?

what’s the actual problem, does it break the animations?

you can determine the real order from the respective bone names so may be you can reorder them after initialization.

By the way, how do I fix this? Wheels go under the landscape when descending from a mountain at a speed of more than 50 km / h

I found everything, I had to remove this

I noticed a strange problem, if the speed of the tank is higher (22 km/h), then the wheel turns are inverted (Steering). I wrote a crutch for this, but I would like to know the real reason for this strange behavior.

tire ground penetration related parameters are mentioned in the documentation. check “Suspension Hard Contact”, “Suspension Tire Penetration” and Suspension Constraint component.

there is no known issue that reverses steering, it doesn’t sound possible, if you modified source code you might have corrupted some calculations.

About knocking down the index in the array of axes, only breaks the animation. Here I indicate the indices, as in your example, and they are knocked down every time the editor is started. I realized that I need to create an array manually, depending on the names of the bones, but I’d rather add the index to the axis so that I can set it manually, at least I’ll try it))

This is what I do, I am very pleased with your physics, it is really very, very cool!

By the way, is there a ready-made solution to limit the vehicle speed?

there is no speed limiter but may be you can use the setCruiseSpeed function in the ArcadeAssists component. it gives an instant speed to the vehicle, you can call it when the vehicle exceeds your limit.

function setCruiseSpeed leads to an unexpected result)) somehow it affects the suspension and sound bugs in RPM. I will write a forced stop in physics (Set Linear Physics).