Tank PhysX Simulation Turning and Propulsion?

Hey, I’ve been playing around with making a tank in Unreal using PhysX. I have suspension working really well with some physics constraints, but I’m having a few issues with both the turning and the propulsion.

I’ve been using the physics torque to move the wheels, which is great and all, but it doesn’t guarantee that all of the wheels on one side of the tank will spin at the same speed (which should be the case, as they are connected by treads). I could set the angular velocity of all of the wheels, but then it loses some realism, eg. the wheels don’t spin slower when going up a hill. I was curious if there was a way to keep all of them spinning at the same RPM.

I’ve also had some problems with turning. Currently I apply breaks to one side on a turn, which essentially just subtract from the angular velocity. This works pretty well, but eventually the whole thing slips and spirals out of control. Initially I was using spheres for the collision mesh for my wheels, but I’ve since switched to capsules so that there is sliding friction between the wheels and the ground. I’ve played around with linear damping and friction, but also haven’t been able to solve this well either.

Cheers :slight_smile:

Or just use boredenginner’s machine modeling toolkit. Which provides a tank and track based vehicle simulation.…elling-toolkit

I definitely could, but this is a project for fun, so I do want to try to get it working myself