Search Unity

Canceled callbacks not working

Discussion in 'Input System' started by mikabrytu, Oct 15, 2019.

  1. mikabrytu

    mikabrytu

    Joined:
    Oct 20, 2015
    Posts:
    3
    Hi! I decide to try the new Input System and it's awesome, but there's an issue that I didn't see anyone reported yet: the canceled callback is never triggered.

    This is my script. Very basic but even so, the StopMove function can't be called. I don't know if it's related, but the phase of the action never change from started as well

    Screen Shot 2019-10-15 at 07.00.45.png
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    It sounds like your move action is set to "Pass-Through" type? If so, the behavior you see is expected.

    Pass-through actions disable much of the logic built into actions. They are sort of like saying "hey, don't try to be smart or do anything fancy, just pass any kind of input activity straight through to me".

    Setting the move action to type "Value" should give you the behavior you're expecting.
     
    Christof_Stanits likes this.
  3. mikabrytu

    mikabrytu

    Joined:
    Oct 20, 2015
    Posts:
    3
    Actually I didn't set that since I just follow some tutorials. I'm gonna try it out.

    I also notice in some recent tests that context.ReadValue<Vector2>() returns me "0.7, 0.7" when I release the joystick stick. Shouldn't that be a Vector2.zero instead?
     
  4. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Yup, correct. We have an open bug where our HID code is not dealing with detecting signed vs unsigned values correctly and thus wires certain sticks and triggers up incorrectly. We're working on a fix.
     
    mikabrytu likes this.