Unity Rigidbody how to set zero momentum

Code Example - Unity Rigidbody how to set zero momentum

                
                        var rigidbody = GetComponent<Rigidbody>();
// or in case you get it from another object or component
//var rigidbody = otherObjectOrComponent.GetComponent<Rigidbody>();

rigidbody.velocity = Vector3.zero;
rigidbody.angularVelocity = Vector3.zero;