Class ScaleVector3Processor
Scale the components of a Vector3 by constant factors.
Inherited Members
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
[Tooltip("Scale factor to multiply the incoming Vector3's X component by.")]
public float x
Field Value
Type | Description |
---|---|
Single |
y
Scale factor to apply to the vector's y
axis. Defaults to 1.
Declaration
[Tooltip("Scale factor to multiply the incoming Vector3's Y component by.")]
public float y
Field Value
Type | Description |
---|---|
Single |
z
Scale factor to apply to the vector's z
axis. Defaults to 1.
Declaration
[Tooltip("Scale factor to multiply the incoming Vector3's Z component by.")]
public float z
Field Value
Type | Description |
---|---|
Single |
Methods
Process(Vector3, InputControl)
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<UnityEngine.Vector3>.Process(UnityEngine.Vector3, UnityEngine.InputSystem.InputControl)
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |