Closed xanmankey closed 6 months ago
Hi, glad you like the plugin!
Sorry you're having trouble getting things working. I've seen the error you're getting when running the demo, but my understanding of node, webpack, et al, is limited... It seems related to an SSL issue that has been patched in newer versions of Node. I found a post on StackOverflow that talks about this: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported
Chances are you're using a newer version of node... lots of people suggest downgrading, but you'd probably be better off updating packages. Let me know how you get on!
With regard to your issue of not being able to pick up gamepad input, it's tough to diagnose without being able to do a bit of debugging. Have you set up your player objects by calling addPlayer()
?
If you can get a demo up and running, I'd be happy to take a look.
First of all, cool plugin! It's nice to have the support for gamepads, keyboards, and pointers all in one place. I don't think I'm using the plugin right though, as although key inputs are being registered, gamepad inputs are not. I tested my controller using https://hardwaretester.com/gamepad, so it's not that. Here's my code being called in update:
Where each scene contains a custom Player object player and that player object has a Player member (aliased as PlayerInput) named playerInput. The plugin is initialized in preload and the inputs for the MergedInput member mergedInputs of the current scene are set in create.
Here's the code used to set the inputs as well:
It's not a super pressing issue, it's likely that I just configured something wrong regarding gamepad inputs, but I figured I'd reach out and ask all the same.
Also I cloned the repository and then tried to
Install with npm install, then use npm run dev to spin up a development server and run the demo scene
in an attempt to see if my controller was working with the demo scene, but that errored out with the following errorIt's very possible I have something configured differently on my end or there's an environmental difference, but I just wanted to bring it up all the same.