Struct MassProperties
The mass properties of an object.
Inherited Members
Namespace: Unity.Physics
Syntax
public struct MassProperties
Fields
AngularExpansionFactor
Upper bound on the rate of change of the object's extent in any direction, with respect to angular speed around its center of mass. Used to determine how much to expand a rigid body's AABB to enclose its swept volume.
Declaration
public float AngularExpansionFactor
Field Value
Type | Description |
---|---|
Single |
MassDistribution
The distribution of a unit mass throughout the object.
Declaration
public MassDistribution MassDistribution
Field Value
Type | Description |
---|---|
MassDistribution |
UnitSphere
(Immutable) The mass properties of a unit sphere.
Declaration
public static readonly MassProperties UnitSphere
Field Value
Type | Description |
---|---|
MassProperties |
Volume
The volume of the object.
Declaration
public float Volume
Field Value
Type | Description |
---|---|
Single |
Methods
CreateBox(in float3)
Creates mass properties of a box with the provided side lengths, centered on the origin.
Declaration
public static MassProperties CreateBox(in float3 size)
Parameters
Type | Name | Description |
---|---|---|
float3 | size | Side lengths of the box along x, y and z. |
Returns
Type | Description |
---|---|
MassProperties | Mass properties of the box. |