# Simulating ground friction for vehicles - tank movement

**URL:** <https://forums.unrealengine.com/t/simulating-ground-friction-for-vehicles-tank-movement/415675>\
**Category:** World Creation\
**Tags:** friction, vehicle, unreal-engine, Physics, question\
**Created:** [January 27, 2018, 6:55pm UTC](https://forums.unrealengine.com/t/simulating-ground-friction-for-vehicles-tank-movement/415675 "2018-01-27T18:55:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BringTheSmiles](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BringTheSmiles](https://forums.unrealengine.com/u/BringTheSmiles)\
**Post date:** [January 27, 2018, 6:55pm UTC](https://forums.unrealengine.com/t/simulating-ground-friction-for-vehicles-tank-movement/415675/1 "2018-01-27T18:55:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vr\_marco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vr_marco/32/1194556_2.png) [@vr\_marco](https://forums.unrealengine.com/u/vr_marco)\
**Post date:** [January 27, 2018, 8:26pm UTC](https://forums.unrealengine.com/t/simulating-ground-friction-for-vehicles-tank-movement/415675/2 "2018-01-27T20:26:04Z")

</div>

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:

> **[GitHub - BoredEngineer/UE4\_Tracked\_Vehicles: Custom tracked vehicles for UE4,...](https://github.com/BoredEngineer/UE4_Tracked_Vehicles)**
>
> Custom tracked vehicles for UE4, NOT based on PhysX Vehicle classes - GitHub - BoredEngineer/UE4\_Tracked\_Vehicles: Custom tracked vehicles for UE4, NOT based on PhysX Vehicle classes

And here the link to the original thread:

[https://forums.unrealengine.com/community/work-in-progress/54936-assets-open-source-tanks-tracks-and-n-wheeled-vehicles](https://forums.unrealengine.com/community/work-in-progress/54936-assets-open-source-tanks-tracks-and-n-wheeled-vehicles)

---

<div class="post-metadata">

**Author:** ![BoredEngineer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BoredEngineer](https://forums.unrealengine.com/u/BoredEngineer)\
**Post date:** [January 27, 2018, 10:02pm UTC](https://forums.unrealengine.com/t/simulating-ground-friction-for-vehicles-tank-movement/415675/3 "2018-01-27T22:02:23Z")

</div>

@vr_marco Cheers! 🙂  
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](https://forums.unrealengine.com/community/community-content-tools-and-tutorials/71452-open-source-machinery-modelling-toolkit) 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.

---

<div class="post-metadata">

**Author:** ![BringTheSmiles](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BringTheSmiles](https://forums.unrealengine.com/u/BringTheSmiles)\
**Post date:** [January 27, 2018, 10:37pm UTC](https://forums.unrealengine.com/t/simulating-ground-friction-for-vehicles-tank-movement/415675/4 "2018-01-27T22:37:09Z")

</div>

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