Addressing the tanks constantly launching into the air problem (least fun part for me since the movement was added)

Up to lecture 189 so far, I’m not sure if this is specifically addressed at any point, but I wanted to share a simple change that has helped me with this particularly annoying issue.

At first I thought the collision for the tanks tracks would occasionally clip into the landscape and cause the tank to launch into the air. But after some playing around, it looks like the collision is actually working properly, it’s just that the track’s simplified collision that we generated has too sharp of an angle at the bottom. When this sharp edge on the collision box encounters a very minor change in the flatness of the landscape, suddenly that corner is pushing into the completely static landscape with 300,000 Nm of force, causing the tanks to pop up into the air.

Anyway, this is a simple fix that allows me to move more than 1 meter forward without exploding up. Scale the existing collision down like below to decrease the angle, or replace with a capsule collision:

It’s easy to see the results if you make a quick setup like this by dropping some cubes into the level and making a large flat surface with a very tiny step:

Also just to note, for stability it really helps if you set the Center of Mass Offset under physics on the Tank Body to something like -150 for Z.

Privacy & Terms