So after a bit of a hiatus, I came back to try and get the physics closer to my envisioned state. This meant I needed to implement a few functions that were not possible using blueprints alone.
What did I need to change? Well it started with just the chaosvehiclesplugin, which houses a lot of the main functionality of the vehicles simulation. Through this I was able to implement differentials (LSD, Open, and Locked) but upon finishing that I discovered a big flaw in my new system. We need to go a little back though for context.
The Main Problem
Weird behavior of the default plugin is very noticeable when driving a high powered rear wheel drive vehicle. In 1st gear excessive wheelspin would cause momentary lose of torque. The wheel would rapidly oscillate between full torque and 0 torque causing weird jittering, and the EngineRPM would not reach the maximum limit. There was an odd feedback loop that would make it seem like the car was misfiring/playing up. Overall it felt horrible.
That was one part, the next part was that it seemed like all drive torque was calculated based on the last drive wheel, so if a car had a high center of gravity and soft suspension and could lift the inside wheel during cornering, the car would lose all drive.
So this led me to implementing a completely new drivetrain logic that replaces everything from engine power calculations to the wheel speed applied. With a slippable clutch, and differential adjustments to distribute the power.
It has taken many many hours to come up with a system that isn’t overly complicated but feels right. I went as deep as full engine load + clutch thermal management and all the way to the other end with simple RPM calculations and a slider between wheel and engine RPM. I’ve ended up somewhere in the middle, trying to keep in mind that the game is supposed to be fun, and not a simulation.
In summary, I’ve added proper differential configurations, a clutch can be manually activated to clutch kick, helps launch, slips between gears and generally does clutch things. While also fixing weird wheel speed issues with wheel overspeed/torque cut when doing drifting/burnouts. The fun stuff!

Leave a Reply