Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Unity #Rigidbody #set #momentum
ADD COMMENT
Topic
Name
4+6 =