Search Unity

Second key-press doesn't trigger an event? [solved]

Discussion in 'Input System' started by Calimar41, Dec 2, 2020.

  1. Calimar41

    Calimar41

    Joined:
    Nov 26, 2020
    Posts:
    5
    Hello everyone,
    I've looked to see if anyone else had the same problem but either I missed it, or I'm the first one to see it. As I'm quite new to unity, I'd appreciate some pointers.

    I'm writing a simple platformer and was using the new input system (1.0.1), looks nice, took me a while to figure it out but hey. So I code in my actions, get callbacks, but figure i can't run and jump.

    So I logged the callbacks printing out context and I see that if I press and hold a key, then press and hold another, the second isn't sending any callbacks until I release the first.
    If I press A (get a callback), keep it, then press S, I don't get another callback. If I then release A, I don't get a callback either.
    And when I release the last key I had held pressed, I get a callback from the other for action Performed and then cancelled, with the exact same timetag.

    Anyone else having an issue like this? Am I doing something wrong?
    Thank you!
     
  2. Calimar41

    Calimar41

    Joined:
    Nov 26, 2020
    Posts:
    5
    I've solved this. It was just my bad understanding of the system.

    For those facing a similar problem, my Input Actions setup included a "press" interaction for the WASD component; this was neither necessary nor useful. Removing that "filter", the whole worked fine.