docs.unity3d.com
    Show / Hide Table of Contents

    Class ScaleVector3Processor

    Scale the components of a by constant factors.

    Inheritance
    Object
    InputProcessor
    InputProcessor<Vector3>
    ScaleVector3Processor
    Inherited Members
    InputProcessor<Vector3>.ProcessAsObject(Object, InputControl)
    InputProcessor<Vector3>.Process(Void*, Int32, InputControl)
    Namespace: UnityEngine.InputSystem.Processors
    Syntax
    public class ScaleVector3Processor : InputProcessor<Vector3>
    Remarks

    This processor is registered (see RegisterProcessor<T>(String)) under the name "scaleVector3".

    // Double the magnitude of gravity values read from a gravity sensor.
    myAction.AddBinding("<GravitySensor>/gravity").WithProcessor("scaleVector3(x=2,y=2,z=2)");

    Fields

    x

    Scale factor to apply to the vector's x axis. Defaults to 1.

    Declaration
    public float x
    Field Value
    Type Description
    Single

    y

    Scale factor to apply to the vector's y axis. Defaults to 1.

    Declaration
    public float y
    Field Value
    Type Description
    Single

    z

    Scale factor to apply to the vector's z axis. Defaults to 1.

    Declaration
    public float z
    Field Value
    Type Description
    Single

    Methods

    Process(Vector3, InputControl)

    Return value scaled by x, y, and z.

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

    Input value.

    InputControl control

    Ignored.

    Returns
    Type Description
    Vector3

    Scaled vector.

    Overrides
    UnityEngine.InputSystem.InputProcessor<Vector3>.Process(Vector3, UnityEngine.InputSystem.InputControl)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    See Also

    ScaleProcessor
    ScaleVector2Processor
    In This Article
    • Fields
      • x
      • y
      • z
    • Methods
      • Process(Vector3, InputControl)
      • ToString()
    • See Also
    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