Hi guys, I have used the new Input System for some time but today I came across something that is not working as it should or I have misunderstood something.
This is my Input action Asset:
I’m generating the TouchControls.cs class from it and copying the input values when using WASD to a scriptable object with a simple Vector2 property with this code:
[SerializeField] private InputMap inputMap;
private TouchControls touchControls;
private void Awake()
{
touchControls = new TouchControls();
}
private void OnEnable()
{
touchControls.Enable();
touchControls.Player.Move.performed += OnMove;
touchControls.Player.Move.canceled += OnMoveCancel;
}
private void OnDisable()
{
touchControls.Disable();
touchControls.Player.Move.performed -= OnMove;
touchControls.Player.Move.canceled -= OnMoveCancel;
}
private void OnMove(InputAction.CallbackContext context)
{
inputMap.moveVector = context.ReadValue<Vector2>();
}
private void OnMoveCancel(InputAction.CallbackContext context)
{
inputMap.moveVector = Vector2.zero;
}
As you can see in the image I have setup a (0.5, 0.5) Scale Vector2 Processor for W (the same for all the other bindings) but the values I get from them are always 0 or 1.
As I understand it, when I press W, the composite get (0,1) vector and aplying that processor I shold be reading (0, 0.5).
What am I missing?
