Search
 
SCRIPT & CODE EXAMPLE
 

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;
Comment

PREVIOUS NEXT
Code Example
Csharp :: Cursor Lock and Visible in Unity 
Csharp :: get current assembly path c# 
Csharp :: create list c# 
Csharp :: how to clone something unity 
Csharp :: c# making a folder 
Csharp :: unity RemoveComponent 
Csharp :: C# Program For Check Total Occurrence Of A Number In An Array 
Csharp :: c# itext 7 pdf add pdf 
Csharp :: c# list remove item based on property duplicate 
Csharp :: unity get all children 
Csharp :: c# latex 
Csharp :: how to close an application in c# 
Csharp :: unity key down 
Csharp :: how to do a messagebox in c# 
Csharp :: gameobject in unity c# 
Csharp :: Unity Destroy gameObject upon collision 
Csharp :: int to bool c# 
Csharp :: .net get system environment variable 
Csharp :: how add text to element in javascript 
Csharp :: get out of foreach statement c# 
Csharp :: unity button onclick 
Csharp :: c# get last 3 characters of string 
Csharp :: c# add to array 
Csharp :: unity health bar 
Csharp :: unity c# audio source 
Csharp :: windows form textbox password 
Csharp :: c# generate unique key 
Csharp :: Customize yup number 
Csharp :: declare dictionary c# 
Csharp :: split string c# 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =