docs.unity3d.com
    Show / Hide Table of Contents

    Struct MassProperties

    The mass properties of an object.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023