Any idea on how to add a gamepad to a game?

For that check my example code here:

I am not sure how a single gamepad can be used by both players :slight_smile:

Here is a controller that has multiple input handlers (mouse, touch, keyboard and gamepad):

https://playcanvas.github.io/#camera/first-person.html

The code for the camera script is here:

https://github.com/playcanvas/playcanvas.github.io/blob/master/scripts/camera/first-person-camera.js

1 Like