Simulating ground friction for vehicles - tank movement

Hey guys!
I’m trying to put together a tank, and what I’ve done so far is use linetraces and forces for suspension. it works great but now the tank is essentially hovering. any tips to how I would simulate ground friction to avoid sliding sideways and sliding when standing still in an incline?

Or maybe I should do it completely differently?
Any help would be appreciated

I have experience on how to calculate longitudinal and lateral friction for wheeled vehicles, but not for tanks with tracks. However @BoredEngineer has done quite some work on the subject and has released the full source code for others to learn from. You can find it here:

And here the link to the original thread:

@vr_marco Cheers! :slight_smile:
Links above are purely BP implementation. There is c++ implementation in Machinery Modeling Toolkiit [OPEN-SOURCE] Machinery Modelling Toolkit - Community Content, Tools and Tutorials - Unreal Engine Forums and some other necessary functions to make physics logic frame rate independent.
Overall, the idea is to simulate friction by calculating total amount of force that need to be applied to completely stop vehicle and then apply only the part of this force that passes test for static/dynamic friction. Drop me a note in MMT If you find code confusing. Or if you have other ideas on how it an be implemented. One of the other approaches is to use vehicle tire friction physics with a different parameters to imitate track.

Thanks! I’ve been looking around in your code and I think I get the basic concept. I’ll definitely give this a try!