Topper Posted April 3, 2018 Share Posted April 3, 2018 Hi folks, I used the Easter holidays trying to put gamepad support to my tool (xbox 360 controller). I startet playing around with PGs and trying to get along with code. I found this PG that has a nice gamepad cam and doesn´t even need to use the BABYLON.GamepadManager: https://www.babylonjs-playground.com/#I4ZB4S#1 And I found another PG that uses the BABYLON.GamepadManager: http://playground.babylonjs.com/#U3XJTB#4 For some reason, the second PG example works fine in Firefox but not in Chrome although both browsers detect my gamepad. Chrome: Version 65.0.3325.181 (Offizieller Build) (64-Bit) Firefox: 59.0.2 (64-Bit) Chrome shows two textControls with one saying "connected: 0" although the other one shows the button click events. But the sphere doesn't react to button clicks. In Firefox I can move the sphere. I don´t know weather this is a bug or not. Can I combine GamePadCamera and button press events? PG available? And I still didn´t get what the Gamepad.Manager is for, since gamepads are natively supported by browsers. Am I missing something? BR, Markus Quote Link to comment Share on other sites More sharing options...
Topper Posted April 3, 2018 Author Share Posted April 3, 2018 No one? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 3, 2018 Share Posted April 3, 2018 Hello Markus, Pinging @trevordev to help you! Quote Link to comment Share on other sites More sharing options...
trevordev Posted April 3, 2018 Share Posted April 3, 2018 Hey, for me the second playground is working in chrome and firefox. My chrome version is Version 65.0.3325.181 (Official Build) (64-bit) as well. You can use the gamepad manager without the vr environment, see this PG https://www.babylonjs-playground.com/#ULL4ER#2 which should be working in all browsers. If you are still seeing this not work in chrome let me know. The gamepad camera should be able to work with the gamepad api to get automatic support for moving the camera and then using the gamepad api to add custom button logic. Here is a PG: https://playground.babylonjs.com/#EL7754 From my understanding Babylon's gamepad manager api was added to provide ease of use/consistency when using gamepads with babylon (eg. button observables, specific controller support like xbox). I believe there should be no issue if you choose to use the native browser APIs instead. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Topper Posted April 4, 2018 Author Share Posted April 4, 2018 Thanks guys, that´s exactly what I was looking for. BR, Markus Quote Link to comment Share on other sites More sharing options...
Topper Posted April 4, 2018 Author Share Posted April 4, 2018 Ok, i got it done. Thanks again, friends. This one can be closed. BR, Markus trevordev 1 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.