📜  unity Rigidbody 如何设置零动量 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:41.854000             🧑  作者: Mango

代码示例1
var rigidbody = GetComponent();
// or in case you get it from another object or component
//var rigidbody = otherObjectOrComponent.GetComponent();

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