docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class InvertVector2Processor

    Inverts the x and/or y channel of a Vector2.

    Inheritance
    object
    InputProcessor
    InputProcessor<Vector2>
    InvertVector2Processor
    Inherited Members
    InputProcessor<Vector2>.ProcessAsObject(object, InputControl)
    InputProcessor<Vector2>.Process(void*, int, InputControl)
    InputProcessor.cachingPolicy
    Namespace: UnityEngine.InputSystem.Processors
    Assembly: Unity.InputSystem.dll
    Syntax
    public class InvertVector2Processor : InputProcessor<Vector2>
    Remarks

    This process is registered (see RegisterProcessor<T>(string) as "invertVector2" by default.

    // Bind to the left stick on the gamepad such that its Y channel is inverted.
    new InputAction(binding: "<Gamepad>/leftStick", processors="invertVector2(invertY,invertX=false)");

    Fields

    invertX

    If true, the x channel of the Vector2 input value is inverted. True by default.

    Declaration
    public bool invertX
    Field Value
    Type Description
    bool
    See Also
    InvertVector3Processor

    invertY

    If true, the y channel of the Vector2 input value is inverted. True by default.

    Declaration
    public bool invertY
    Field Value
    Type Description
    bool
    See Also
    InvertVector3Processor

    Methods

    Process(Vector2, InputControl)

    Invert the x and/or y channel of the given value.

    Declaration
    public override Vector2 Process(Vector2 value, InputControl control)
    Parameters
    Type Name Description
    Vector2 value

    Input value.

    InputControl control

    Ignored.

    Returns
    Type Description
    Vector2

    Vector2 with inverted channels.

    Overrides
    InputProcessor<Vector2>.Process(Vector2, InputControl)
    See Also
    InvertVector3Processor

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    See Also
    InvertVector3Processor

    See Also

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