docs.unity3d.com
    Show / Hide Table of Contents

    Enum Vector2Composite.Mode

    Determines how a Vector2 is synthesized from part controls.

    Namespace: UnityEngine.InputSystem.Composites
    Syntax
    public enum Mode : int

    Fields

    Name Description Value
    Analog

    Part controls are treated as analog meaning that the floating-point values read from controls will come through as is (minus the fact that the down and left direction values are negated).

    Digital

    Part controls are treated as buttons (on/off) and the resulting vector is not normalized. This means that if, for example, both left and up are pressed, the resulting vector is (-1,1) and has a length greater than 1. The resulting 2D area is box-shaped.

    DigitalNormalized

    Part controls are treated as buttons (on/off) and the resulting vector is normalized. This means that if, for example, both left and up are pressed, instead of returning a vector (-1,1), a vector of roughly (-0.7,0.7) (that is, corresponding to new Vector2(-1,1).normalized) is returned instead. The resulting 2D area is diamond-shaped.

    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