Skip to main content
Memleak's user avatar
Memleak's user avatar
Memleak's user avatar
Memleak
  • Member for 11 years, 7 months
  • Last seen more than 4 years ago
awarded
comment
In Unity, how can I check if an input was made x seconds/frames ago?
I don't see why you need to compare time in this specific problem. You have to look for "key down" events. That means when the user pressed the button not while it is pressed or released. In Unity you achieve this with GetKeyDown. This way your code will no longer start running multiple times but only when both conditions are satisfied (key down and both key pressed at that time).
Loading…
awarded
Loading…
answered
Loading…
Loading…