Class ScaleVector3Processor
Scale the components of a Vector3 by constant factors.
Inherited Members
Namespace: UnityEngine.InputSystem.Processors
Assembly: Unity.InputSystem.dll
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 |
---|---|
float |
See Also
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 |
---|---|
float |
See Also
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 |
---|---|
float |
See Also
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
See Also
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |