- Home /
Key presses stick "down" for user in WebGL after key is up
In my game, the FPS character is moved by WASD. If the input context is switched, for example alt+tab away from the window, while the user is holding W, then the context is returned to the game but no keys are being pressed by user, Unity will interpret the W key is still being held down and the character moves forwards forever with no input.
If the user presses and releases the W key this will solve the problem and the input stops happening.
Question: How can I prevent Unity from letting keys "stick" when switching to and from the game?
Your answer
Follow this Question
Related Questions
Error while uploading Facebook Web GL to Facebook 0 Answers
how can I check if my unity pro is for webgl or not ? 1 Answer
Screen Recording in WebGL 0 Answers
WebGL: protect content 0 Answers
WebGL the worst... multiple errors 0 Answers