Search Unity

Question Keyboard Input events not always being sent in new input system.

Discussion in 'Input System' started by petey, Nov 25, 2021.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Hi there,

    I have an input set up like this (to turn my character) -
    Screen Shot 2021-11-25 at 3.26.49 pm.png

    That's set in the 'Player input' to receive the event -
    Screen Shot 2021-11-25 at 3.33.02 pm.png
    The problem is, some events don't get called. Which means the character gets stuck doing a spin or not turning.
    Does anyone have a workaround for this? It gets pretty annoying when you are playing the game when your input doesn't happen.

    Thanks!
    Pete
     
  2. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    Out of interest @petey, what OS / Unity version are you on? I'm having the same issue, but with normal legacy input. I'm using 2021.2.3 on Mac OS. I'm wondering whether it's an OS thing.
     
  3. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Hey @adslitw! Oops, I forgot all the important stuff :D
    I'm on -
    macOS 12.0.1 (21A559)
    Unity 2020.3.1
    Input System 1.2.0

    It's been happening for a while, I just finally cracked and thought I'd post about it. It makes playing the game really frustrating. I just set up a simple log of the input values and it definitely misses the odd one here and there.
     
  4. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    @petey - yeah I notice it occasionally on my Intel Mac, but I've recently got an M1 Pro laptop and it's basically unusable in my case, and that's just with the legacy input system. In the almost empty repro project I submitted (#1381681) I can get a keypress 'stuck' every once in a while, but in my actual current project it's sticking / missing inputs every second or so!

    The Intel Mac is on Big Sur and the M1 is on Monterey, so I don't if that's the difference there or not.

    I'm really keen to hear from someone at Unity to see whether it's something they're aware of, but so far I've been checking all the threads bringing this (or something similar) up and there hasn't been a response.
     
  5. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    I wonder if it's somehow slipping through one of the update methods? I'm not exactly sure which it runs on though and I think that might be out of our hands.
    I also tried to make a hacky fix by checking if the button was held, but I didn't have much luck. That doesn't get sent through as an input context.
     
  6. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Did you find any workaround for this @adslitw? I swear mine has become self aware now and waits for the most annoying point to screw up :D It's slowly breaking me...
     
  7. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    Haha, nope, no workaround unfortunately. I've tried pretty much everything. My workaround is to not use my lovely new laptop very much... :(

    When I do use it, I'm either mostly coding with very little playtesting, or I use a gamepad.

    Fingers crossed this issue gets sorted quickly, I agree it's intensely frustrating, haha...
     
  8. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Ahh damn! Sorry to hear it. Well I might see if I can make a nice repro scene and send it off. I’ll let you know if i hear any good news. :)
     
  9. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    petey likes this.
  10. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,823
    Awesome! Thankyou :)