Class StickDeadzoneProcessor
Processes a Vector2 to apply deadzoning according to the magnitude of the vector (rather than just clamping individual axes). Normalizes to the min/max range.
Inherited Members
Namespace: UnityEngine.InputSystem.Processors
Assembly: Unity.InputSystem.dll
Syntax
public class StickDeadzoneProcessor : InputProcessor<Vector2>
Fields
max
Declaration
public float max
Field Value
Type | Description |
---|---|
float |
See Also
min
Value at which the lower bound deadzone starts.
Declaration
public float min
Field Value
Type | Description |
---|---|
float |
Remarks
Values in the input at or below min will get dropped and values will be scaled to the range between min and max.
See Also
Methods
Process(Vector2, InputControl)
Process the given value and return the result.
Declaration
public override Vector2 Process(Vector2 value, InputControl control = null)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | value | Input value to process. |
InputControl | control | Control that the value originally came from. This can be null if the value did not originate from a control. This can be the case, for example, if the processor sits on a composite binding (InputBindingComposite) as composites are not directly associated with controls but rather source their values through their child bindings. |
Returns
Type | Description |
---|---|
Vector2 | Processed input value. |
Overrides
Remarks
The implementation of this method must not be stateful.
See Also
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |