Problem Description
Keyboard Plugin does not consistently detect keyboard physical position in certain situations (ie when key is released)
Attach a Capx
____ Upload a Capx to this post ____
Description of Capx
Sprite element contains CustomMovement plugin. CustomMovement is simply mapped to WASD keys.
Steps to Reproduce Bug
- Run the game, then hold down the W key. Sprite moves up.
- While W key is held down, press and hold D key. Sprite moves up-right.
- Then release D key only (W still held down). Sprite nudges up, but stops afterwards.
Then try another variation:
- Hold down the W key. Sprite moves up.
- While W key is held down, press and hold D key. Sprite moves up-right.
- Then release W key only. Sprite moves right and does not stop.
Observed Result
When W key is held, and then D is held afterwards, releasing the D key will stop the movement altogether. But if the W key is released, the movement smoothly continues.
Expected Result
It seems like only the last pressed key is being received during a keyboard position check. I'd expect that the the keyboard's input is checked more actively so that player control is smooth. By the way, this behaviour is also the same when using 8-direction, and using arrow keys. As it stands, this behaviour limits the use of keyboard-driven movement.
Affected Browsers
- Chrome: (YES)
- FireFox: (YES)
- Internet Explorer: (YES)
Operating System and Service Pack
Win 7 Pro
Construct 2 Version ID
Release 184