InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

Button PressAndRelease now has incorrect/unstable behaviors in 0.2.6 preview

Open periodyctom opened this issue 7 years ago • 5 comments

PressButtonGamepadMinRepro.zip

In this sample, buttonSouth/keyboard s produces Performed on both press and release when the Continious flag is set to false. I'm no longer seeing Canceled like the previous package versions.

If I set the Continous flag to true, Performed is spammed infinitely and doesn't stop when the button is released.

Win10 64, keyboard, PS4 DualShock, XBOX One Gamepad.

periodyctom avatar Mar 24 '19 21:03 periodyctom

This is by design. @Rene-Damm can you confirm?

JiaUnity avatar Mar 27 '19 00:03 JiaUnity

Hello, if it is by design, I think it should also triger when another key is pressed. For mouvement wqsd if I press "d" I i get a Vector2 (1,0) If I release I get a (0,0), so far so good. But I can never get a (0.7,0.7) I always presse one key first and the the other one does not trigger anything. If it's the "Pass Through" intended purpose, it does not work.

WaynGames avatar Apr 19 '19 17:04 WaynGames

The problem I experienced is I'm getting 2 "Performed" events, there is no way to tell when the action begins or ends. If it produced Started -> Performed or Performed -> Canceled then I can disambiguate.

periodyctom avatar Apr 30 '19 19:04 periodyctom

Exactly – "Press and Release" used to send different events during the Press and Release stage. Now it doesn't; so unless you keep track of the 'pressed' status of your buttons by yourself, you can't tell the stages apart.

Rallix avatar May 22 '19 20:05 Rallix

This is fixed in the latest package release 0.3.0-preview. Closing

@periodyctom @tomas-jezek if you want to differentiate the press and release, "Press" interactions is not the right choice. I suggest using Tap or Slow Tap, which generates both Started and Performed.

JiaUnity avatar May 22 '19 23:05 JiaUnity