docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method CreateBox

    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.

    In This Article
    Back to top
    Copyright © 2023 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)