MackeyK24 Posted November 23, 2016 Share Posted November 23, 2016 The gamepad attachControl uses: new BABYLON.Gamepads((pad: BABYLON.Gamepad) => { this.onGamepadConnected(pad); }); but this.onGamepadConnected ONLY gets fired ONCE per browser session... If you refresh the page page it never gets fired thus the game pad no longer works... If i totally close down the browser and restart it works again because new instance of browser... What can we do about that??? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 23, 2016 Share Posted November 23, 2016 Ping @davrous Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 24, 2016 Author Share Posted November 24, 2016 Hey Dave (davrous): Are you handling the GamePad? If So, the gamepad does fire on page refresh. basically if the game pad is already attached to the page (available with navigator.getGamepads()[0]) then On Game Pad connected NEVER gets fired... I think we need to mod the code to check if the gamepad is already attached then use that attached gamed and create a BABYLON.Gamepad wrapper and call _callbackOnGamepadConnected... That way we still get the on gamepad connected event that drive out gamepad usage whether the gamepad is already attached or actually just got activated because use hit the but on a "CLEAN PAGE"... Let me know what you think... Note: It may only be an issue on MAC OS X... but on each browser on mac... The browser session itself has to be shutdown and reopened to get that on connected event... Probably on mac the instance is still alive with that gamepad still attached... even if you refresh the page. P.S. Sorry don't know how to do the User Name Tag thing you have next to "Ping" @davrous Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 28, 2016 Share Posted November 28, 2016 Just type @ and wait for the flyout to appear Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.