Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi i got this problem on itchio that my fps player is not able to move in my webgl game.. It is able to move when i test the project in CC in Webgl anyone had this problem and could fix it? here is the link to the game http://coasite.itch.io/cc |
||||
|
This happens due to preventDefault(). You need to manually override the keys to stop controlling the page on focus. Here is a thread by @csp-games(Dieter) that has JS code to make the keyboard input work in webGL itch.io. https://www.ambiera.com/forum.ph... |
||||
|
thanks! but the code did not work for me |
||||
|
Any luck with that, @coa? I'm having the same problem. I copied @csp-games solution (replacing the "on-key-pressed" etc) and pasted it as a new js script in the index page of my game but, well, i'm not sure if that is what i was meant to do. It didn't work at any rate :/ |
||||
|
no i did not find a solution other then uploading it to another server |
||||
|
Just created an action that fixes the keyboard controls for games published as webGL. So that they don't lose focus and controls don't get messed up. It will be uploaded to the neophyte.cf in half hour. Hopefully that will fix your problem. All you have to do is to attach the action to your " before first drawing do something" behavior. |
|