useAutoMass
Should the total rigid-body _mass be automatically calculated from the _density of attached colliders?
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public bool useAutoMass { get; set; }
Remarks
When false, the explicitly set _mass is used for the rigid-body mass. When true, the mass is automatically calculated from all attached Collider2D as a product of their _density and area.
When true, inside the Unity editor, the _density property will appear on any attached Collider2D and the _mass property will become read-only.