{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method ApplyScale | Unity Physics | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ApplyScale

    ApplyScale(in PhysicsMass, float)

    Scale the mass of the body using provided scale.

    Declaration
    public static PhysicsMass ApplyScale(this in PhysicsMass pm, float uniformScale)
    Parameters
    Type Name Description
    PhysicsMass pm

    The body's PhysicsMass component.

    float uniformScale

    The body's uniform scale. If this value is approximately 1.0, the function will early-out with no effect.

    Returns
    Type Description
    PhysicsMass

    A body's physics mass with respect to it's scale.

    Remarks

    Do not use this function to scale physics mass for simulation purposes, that is done automatically by physics systems. Use it if you need PhysicsMass in one of your functions if the body has a non-identity scale component, and do not write back this mass to the body's entity components.

    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)