文档

Unity Engine

Unity Engine

inertia

The Rigidbody's resistance to changes in angular velocity (rotation).
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public float inertia { get; set; }

Remarks

Rotational inertia controls a Rigidbody's resistance to changes in Rigidbody2D.angularVelocity. It is similar to how Rigidbody2D.mass controls a Rigidbody's resistance to changes in Rigidbody2D.linearVelocity.
The rotational inertia is automatically calculated based on the Rigidbody's Rigidbody2D.mass position relative to the Rigidbody2D.centerOfMass. It can also be specified explicitly by setting this property in the same way Rigidbody2D.mass can be set.