docs.unity.cn
    Show / Hide Table of Contents

    Enum ScaleMode

    Enum representing the two modes of scaling: Input and Distance.

    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public enum ScaleMode

    Fields

    Name Description Value
    None

    No scale mode is active or supported. Use this when a controller does not support scaling or when scaling is not needed.


    0
    Input

    Input scale mode: The scale is represented by a range of -1 to 1. This mode is typically used with ActionBasedController, where the value is based on the scale toggle and scale delta input actions.


    1
    Distance

    Distance scale mode: The scale is based on the distance between 2 physical (or virtual) inputs, such as the pinch gap between fingers where the distance is calculated based on the screen DPI, and delta from the previous frame. This mode is typically used with XRScreenSpaceController.


    2
    See Also
    scaleMode
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Tuesday, August 22, 2023