ArcRotateCamera gamepad input other than XBOX

Hi,
ArcRotateCameraGamepadInput doesn’t seem to handle non-xbox gamepad (web gamepad on android in my case).
Comparing with FreeCameraGamepadInput.attachControl(), I’ve find out that this is missing at the method end:

        // if no xbox controller was found, but there are gamepad controllers, take the first one
        if (!this.gamepad && manager.gamepads.length) {
            this.gamepad = manager.gamepads[0];
        }

Symptoms of this are strange: create camera, inputs, gamepad works. However, switch to another camera, switch back to ArcRotateCamera, and everything works except for gamepad. That’s because ArcRotateCameraGamepadInput.gamepad is null, and checkInputs performs null check.
Though I don’t understand why it works for the first time.
Workaround is to override attachControl() with the code equivalent to the above snippet.
Related question: Gamepad Controller - #7 by arcman7

1 Like

That is a pretty nice finding !!! @PolygonalSun I guess there is smthg missing on our side ?

@Josip_Almasi can you provide a tiny repro of the issue within the playground ?

1 Like

Will be fixed by Fix arcrotate gamepad input by sebavan · Pull Request #14665 · BabylonJS/Babylon.js · GitHub

1 Like