Dear Community, I have just built a Physics Based Articulated Vehicle. It moves and turns. It doesn’t have a engine Torque or GearBox setup. It is just direct off the player controllers.
I fixed the add force to rear wheels. you may of found that once you turned the wheels stopped driving or the controls reversed. I fixed it by adding relative Rotation off the parent. Here is the pic so you can fix it yourself.
BoredEngineer, I haven’t added a speedometer to the vehicle. But at the moment I’m building a Drift Car at the moment with these basics and I will see how it goes. But testing the truck it does seem the wheels do goes weird. But I’ll add some resistance to the wheels to see if that works with the Drift Car.
I’ll try to keep this up to date on what I discover.
Reduce the amount of constraints - a lot. Just put a single constraint for spring/damper per wheel and put sensible values for it (I saw that you had really weird values on your truck example for damping, it should have a lot smaller value for damping than the spring strength, by very large margin). Don’t try to model leaf springs etc, keep it simple.
Use actual value for the linear limiter (instead of 0) for the spring and don’t put soft limit at all, that will prevent you from keeping it under control. Soft limiter has no use for vehicle suspension as real vehicles don’t have such things either: if suspension goes to the limit, it just doesn’t go any further. Adjust only linear drive to make the spring and damping for it.
Linear limit is ± so you need to place it in the middle of the travel. If your total spring travel is 30cm, put 15 there.
I think on your truck example wheels actually were pushed bit inward instead of out. So check that your drive if forcing spring to act into right direction.
Use simulate mode, it’s easy to spot weird behavior when you just grab your vehicle with mouse and move it around, up and down, if wheels/suspension looks odd there, they’ll not act right on the ground either.
Thanks for the advice. It was a personal change to see if it could be done. There is still more learning by me still to do. What I was using to inspire me was a pic that ISI (Image Space Incorporated) have on their website which they use for the Gmotor engine (Rfactor, Rfactor2 vehicle racing simulator engine). Pic below. While I was building the truck I kept simulating it to get desired simulation, I tried the soft limits once and notice it didn’t work, if it was still enabled I must of forgot to remove it. I only posted it as I thought it was good for a baseline so others can build their own vehicles, and hopefully Epic Games will help improving what is needed to make decent vehicles.
How does this shape up? You mentioned the engine and the gearbox aren’t done… but those are fairly crucial for a car game. Is this by design or did you simply have no time?