What does wasPressedThisFrame detect?
if (input.wasPressedThisFrame('Fire')) shoot();
- A key pressed on this specific frame
- A key that stays held every frame
- A key that was never once pressed
- Continuous mouse-cursor movement
It fires once on the frame the key goes down, avoiding repeats while it is held.
Play Game Dev ▸