Struct PhysicsMass
The mass properties of a rigid body. If not present, the rigid body has infinite mass and inertia.
Inherited Members
Namespace: Unity.Physics
Syntax
public struct PhysicsMass : IComponentData, IQueryTypeParameter
Fields
AngularExpansionFactor
See MassProperties.AngularExpansionFactor.
Declaration
public float AngularExpansionFactor
Field Value
Type | Description |
---|---|
Single |
InverseInertia
Zero is allowed, for infinite inertia.
Declaration
public float3 InverseInertia
Field Value
Type | Description |
---|---|
float3 |
InverseMass
Zero is allowed, for infinite mass.
Declaration
public float InverseMass
Field Value
Type | Description |
---|---|
Single |
Transform
Center of mass and orientation of principal axes.
Declaration
public RigidTransform Transform
Field Value
Type | Description |
---|---|
RigidTransform |
Properties
CenterOfMass
Gets or sets the center of mass.
Declaration
public float3 CenterOfMass { get; set; }
Property Value
Type | Description |
---|---|
float3 | The center of mass. |
HasInfiniteInertia
Gets a value indicating whether this object has infinite inertia.
Declaration
public readonly bool HasInfiniteInertia { get; }
Property Value
Type | Description |
---|---|
Boolean | True if this object has infinite inertia, false if not. |
HasInfiniteMass
Gets a value indicating whether this object has infinite mass.
Declaration
public readonly bool HasInfiniteMass { get; }
Property Value
Type | Description |
---|---|
Boolean | True if this object has infinite mass, false if not. |
InertiaOrientation
Gets or sets the inertia orientation.
Declaration
public quaternion InertiaOrientation { get; set; }
Property Value
Type | Description |
---|---|
quaternion | The inertia orientation. |
IsKinematic
Gets a value indicating whether this object is kinematic.
Declaration
public readonly bool IsKinematic { get; }
Property Value
Type | Description |
---|---|
Boolean | True if this object is kinematic, false if not. |
Methods
CreateDynamic(MassProperties, Single)
Creates a dynamic mass.
Declaration
public static PhysicsMass CreateDynamic(MassProperties massProperties, float mass)
Parameters
Type | Name | Description |
---|---|---|
MassProperties | massProperties | The mass properties. |
Single | mass | The mass. |
Returns
Type | Description |
---|---|
PhysicsMass | The new dynamic mass. |
CreateKinematic(MassProperties)
Creates a kinematic mass.
Declaration
public static PhysicsMass CreateKinematic(MassProperties massProperties)
Parameters
Type | Name | Description |
---|---|---|
MassProperties | massProperties | The mass properties. |
Returns
Type | Description |
---|---|
PhysicsMass | The new kinematic mass. |