Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.2.6-Preview]Hold Interactions not working as expected? #557

Closed
Methedox opened this issue Apr 19, 2019 · 2 comments
Closed

[0.2.6-Preview]Hold Interactions not working as expected? #557

Methedox opened this issue Apr 19, 2019 · 2 comments
Labels
bug Issues where existsing functionality misbehaves

Comments

@Methedox
Copy link

Methedox commented Apr 19, 2019

Currently, I have an Action of type Button, with a Binding on the 'r' key. The binding have an interaction "Hold" with a Hold time of 2.

I added a debug log on each callback (started, performed, canceled) as their respective names. When I press 'r', I receive both callback started and performed regardless of how many time is set in Hold time.

I found this post from Rene-Damm in January stating:

"Put simply, you should see "started" getting called as soon as a button goes down, "performed" being called when the button is held for longer than the set duration, and "cancelled" being called if it's released before."

https://forum.unity.com/threads/new-input-system-how-to-use-the-hold-interaction.605587/#post-4056961

I have been messing with this for a while now, and the closest I could achieve is with the slow tap, only, the action performed were not called once the duration time was up and required a key release to be triggered.

Edit: Forgot to mention I was using 2019.1.0f2

Edit2: Still present in preview 0.2.8 using Unity 2019.1.0f2

@mstevenson
Copy link

This may be related to issue #576. I've noticed that a context's duration continues to accumulate in the editor, even after exiting play mode. I suspect that the "hold" interaction watches this value to determine when time has elapsed, but the duration starts with an arbitrary positive offset.

@JiaUnity JiaUnity added the bug Issues where existsing functionality misbehaves label May 9, 2019
@JiaUnity
Copy link
Contributor

JiaUnity commented May 9, 2019

Filed: https://issuetracker.unity3d.com/product/unity/issues/guid/1152989/
Like @mstevenson said, this may have something to do with the startTime and duration value. But file separately just in case.
Closing.

@JiaUnity JiaUnity closed this as completed May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues where existsing functionality misbehaves
Projects
None yet
Development

No branches or pull requests

3 participants