object land on the ground but bounce off everthing else?

Short summary of game; the player launches himself in the direction he is looking (the long the player holds down the button the further they launch).

So I have the player object set to bouncy material so that he/she bounces off of walls that he/she collides with, however I do not want the player to bounce off of the floor.

I have the following code:

// The player has landed

function OnCollisionEnter(collision : Collision) {

var sits : RaycastHit;

// Cast ray down
if (Physics.Raycast (transform.position, -Vector3.up, sits, 10)) {
	// Prevent bounce
	rigidbody.velocity = Vector3(0, 0, 0);


(Sorry ‘code sample’ format was not working). Anyhow I set the velocity to zero for when the player lands, but if the player is bouncy enough it will keep spazzing/shaking slightly above the ground. This is because although the velocity is set to zero the bounce makes it so the character isn’t touching the floor and instead is slightly above the ground and so will begin to fall. It will bounce again, be slightly above the ground and repeat. My question is how do I make an object sit exactly on the surface below it, no space between?

The answer is fortunately simple - you must set the PhysicMaterial of the GROUND correctly

It should have zero bounce, and your physics preferences should be set so that the “minimum” is chosen when two meterials interact.

You can then see you will get “zero bounce” if the ground material is “zero bounce’”

However as moghes asks, you must explain what sort of rig you are using??