Hi,i want a simple gampepad joystick script for move to player with oculus go controller…can you help me? thanks
I’ll answer later at home.
thanks, I had already seen but I can’t understand, I want a script already done and that works. Thanks
No Problem. I haven’t really used GamePad input so…
so nobody has a simple script for this?
Nobody here…
I’m running from memory here:
-
In the project settings in the editor, there should be a tickbox called ‘use gamepads’ or similar. This will initialise the gamepad code at startup.
-
You can then access the connected gamepads from
this.app.gamepads
from any pc.script. -
From there, you can use the API docs to get the current state of each connected gamepad https://developer.playcanvas.com/en/api/pc.GamePads.html
To get the access IDs and/or button IDs, use this tester https://html5gamepad.com/
I tried other platforms, I noticed that WebGl reads only the trigger and the touch … I would like to have a simple script. At first touch the player advances straight ahead, in the direction he looks and stops at the second touch. Can anyone do it for me?
So you’re trying out touch screen right? Well, I think I might have an idea, but I’ll type it in later. I’m not home right now.