Vehicle Physics Problem

I’m working on my first Unity project and I’m having some issues with my vehicle’s physics. It’s a tank with a rigidbody on the whole tank and a box collider covering everything from the turret base on down.

When the tank rolls over hills, the entire tank lifts up when the front hits the hill. Also, the tank does not go down the hill. It reaches the top and sort of floats off the top and gently glides down.

I would like it if the front of the tank lifted up when going up the hill and then angled down on the way down, but I can’t figure out how to do this.

I’m assuming my issue is with my one large box collider, but I’ve tried putting wheel colliders on each wheel and I have the same issue.

The game is located at:

I’ve searched the forums for a while and can’t find an idea for a solution. Any help would be greatly appreciated! Thanks!

Hello,
You have to problems:

Firstly
You need to make your mass off the rigidbody a bigger value. This should make it fall to the ground quicker.

Secondly
You need to put a collider around the edge of the tank. At the moment you proberly have a box making it very werid to go up hills.

-James


Have I helped you? If you then please ask if you want to donate to you [/b]

Oh And if you want me to do that for you then just send me the project files!

Increasing the mass did fix the falling issue, but I’m still having problems with the tank moving up and down as a whole. No matter where I put the collider(s) or in any order, the tank still moves uphill and downhill unnaturally.

I tried putting colliders on only the front half or the front wheels, but the back of the tank remains level with the front when going up inclines of any type.

Welcome to the forum, Simian!

This problem might be the result of having a very large scale for your tank model. From the physics point of view, one unit is equal to one metre. The scales used by different modelling apps are not consistent, so it is very easy to import a model and end up with it 100x bigger than you expected. To test this, try creating a cube in the scene next to the tank (menu: GameObject > Create Other > Cube). If the cube is tiny compared to the tank, then you should try reducing the model’s scale either within Unity or in the modelling app.