docs.unity3d.com
    目次を表示する/隠す

    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*, Int32, InputControl)
    Namespace: UnityEngine.InputSystem.Processors
    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
    Boolean

    invertY

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

    Declaration
    public bool invertY
    Field Value
    Type Description
    Boolean

    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
    UnityEngine.InputSystem.InputProcessor<UnityEngine.Vector2>.Process(UnityEngine.Vector2, UnityEngine.InputSystem.InputControl)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    See Also

    InvertVector3Processor
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)