The problem with doing the dirty example is defining the velocity of an object is against the physics system. It is like stopping the object from moving and sending it moving again.
Also cherub got us started on doing that every single processing frame, which is damage by your program to the physics engine! You would find yourself a lot better off using rigidbody.drag
somehow, though I can’t say that 100% is a good thing.
Here is my “definitive” answer to braking an object to a maximum speed:
float speed = Vector3.Magnitude( rigidbody.velocity ); // test current object speed
if (speed > maximumSpeed)
{
float brakeSpeed = speed - maximumSpeed; // calculate the speed decrease
Vector3 normalisedVelocity = rigidbody.velocity.normalized;
Vector3 brakeVelocity = normalisedVelocity * brakeSpeed; // make the brake Vector3 value
rigidbody.AddForce( -brakeVelocity ); // apply opposing brake force
}
Sorry Ehren, but I find your answer very unreadable on this page!
Could someone take a look at my post and let me know if this thread is really one and the same issue? You only mention collisions with known objects in this thread... in my scenario I have no collisions with known objects except, if any, the terrain itself... and also do see in my post that it happens while vehicle is at complete idle. http://answers.unity3d.com/questions/20456/terrain-unexpected-collisions-loopidy-loops
– Spacing