system
1
In a car game, it seems like increasing the mass much is having trivial effect on physics! Even on increasing the mass quite a much, as soon as the car collides with a wall collider, it springs up in the air like anything – as if it’s having a mass like a foot ball!
Gravity is also proper, but can’t get what could probably be the reason for this weird behaviour.
Can any one throw some light on this?
Check the material of the car. What is it? Perhaps if you use a less bouncy material, that responds to mass differently, you’ll get the effect you’re looking for!
Cheers.
system
3
A car should have about 4000 mass from what I’ve been able to determine. Another couple of ways to compensate for this is to use metal physics material for the car and rubber physics material to absorb the impact. Right angled walls are a good idea too so you aren’t helping it. Worst case scenario you can do a distance check to the ground like this…
var hit : RaycastHit; // Hit data container
var noHigher : float = 1; // whatever height you want to limit it to
var myDownForce : int = 100; // down force to push the object down
Physics.RaycastHit(transform.position, -Vector3.up, hit);
if(hit.distance > noHigher) {
rigidbody.AddForce(-Vector3.up * Time.deltaTime * myDownForce);
} // End IF
That way you can control the objects launch. Tweak the variables noHigher and myDownForce to achieve the look and feel you want. Please remember to accept an answer so that others with similar questions can search it.