docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PhysicsMass

    The mass properties of a rigid body. If not present, the rigid body has infinite mass and inertia.

    Implements
    IComponentData
    IQueryTypeParameter
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Physics
    Assembly: Unity.Physics.dll
    Syntax
    public struct PhysicsMass : IComponentData, IQueryTypeParameter

    Fields

    AngularExpansionFactor

    See MassProperties.AngularExpansionFactor.

    Declaration
    public float AngularExpansionFactor
    Field Value
    Type Description
    float

    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
    float

    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 bool HasInfiniteInertia { get; }
    Property Value
    Type Description
    bool

    True if this object has infinite inertia, false if not.

    HasInfiniteMass

    Gets a value indicating whether this object has infinite mass.

    Declaration
    public bool HasInfiniteMass { get; }
    Property Value
    Type Description
    bool

    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 bool IsKinematic { get; }
    Property Value
    Type Description
    bool

    True if this object is kinematic, false if not.

    Methods

    CreateDynamic(MassProperties, float)

    Creates a dynamic mass.

    Declaration
    public static PhysicsMass CreateDynamic(MassProperties massProperties, float mass)
    Parameters
    Type Name Description
    MassProperties massProperties

    The mass properties.

    float 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.

    Implements

    Unity.Entities.IComponentData
    Unity.Entities.IQueryTypeParameter

    Extension Methods

    PhysicsComponentExtensions.ApplyScale(in PhysicsMass, float)
    PhysicsComponentExtensions.GetCenterOfMassWorldSpace(in PhysicsMass, float, in float3, in quaternion)
    PhysicsComponentExtensions.GetCenterOfMassWorldSpace(in PhysicsMass, in float3, in quaternion)
    PhysicsComponentExtensions.GetEffectiveMass(in PhysicsMass, in float3, in quaternion, in float, float3, float3)
    PhysicsComponentExtensions.GetEffectiveMass(in PhysicsMass, in float3, in quaternion, float3, float3)
    PhysicsComponentExtensions.GetImpulseFromForce(in PhysicsMass, float, in float3, in ForceMode, in float, out float3, out PhysicsMass)
    PhysicsComponentExtensions.GetImpulseFromForce(in PhysicsMass, in float3, in ForceMode, in float, out float3, out PhysicsMass)
    PhysicsComponentExtensions.SetCenterOfMassWorldSpace(ref PhysicsMass, in float3, in quaternion, float3)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)