3rd person camera for (empty)gameobject

Hi
Can anyone assist with my problem?
I have a car model with a script for movement but everytime the car turns a corner, it flips. I have tried adjusting the mass and various settings but cant figure it out!

I had a normal car from a tutorial that works fine.
For my car, I had to change the radius of the WheelColliders from 0.45 to 3.00 but everything else is the same. Except maybe my car model is bigger in scale than the other.
I notice if I make the demo tutorial car bigger, it too flips so I guess it is related to the size of the model.

What should I be changing?? Iv searched online but cant find a solution that works.

bump :slight_smile:

Why not lock the rotation angles. I have a 2d game that is rendered in 3d and I lock a bunch constraints on my player so it doesn’t roll forward to backwards, or heaven forbid off the level. There is a way to do it in the editor on the rigid body so I’d look there for the name of the variable.

Good point but I would like a tiny bit over roll to make it realistic. Just not so much to flip :frowning:

Try checking out “Mathf.Clamp”, it constrains the transform of an object. So if you don’t want the car to flip you can simply use Mathf.Clamp to limit the rotation.

Apply an opposing force to the turn such that the car will appear to have normal body roll (like cars do in real life) that way while applying an opposing force while the car is cornering it won’t flip. Basically doing a constant on the max amount of roll before it won’t go any farther. Basically the same concept except giving it some delta value to play with.

Beat me to the punch, also a great suggestion. Listen to the yellow rat!

haha

thank you! I will read into your ideas!