Stop a moving rigid body in Unity 5


I had a problem with a car using a rigid body component where the car will continue its rotation and motion after I change the car to a position. I was able to solve the problem by freezing the rotation and constraining the position of the car while changing the car’s position.
IEnumerator tempFreeze(Rigidbody rb, float wait = 0.1f)
rb.freezeRotation = true;
rb.constraints = RigidbodyConstraints.FreezeAll;
yield return new WaitForSeconds(wait);
rb.freezeRotation = false;
rb.constraints = RigidbodyConstraints.None;