Help with gamepad coding

So with gamepad controls on here, of the joysticks there is just X or Y, no forward or back of each stick, so i need help with a way to detect if the angle is positive or negative and move accordingly, anybody able to help me code this

@Albertos can you help?

Hi @Gavin_Durbin,

This example implements gamepad support for moving the player:

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

You can inspect the code here, on how that works:

4 Likes