Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamepad support no longer working on tvOS simulator #682

Open
gtebbutt opened this issue Mar 9, 2021 · 1 comment
Open

Gamepad support no longer working on tvOS simulator #682

gtebbutt opened this issue Mar 9, 2021 · 1 comment

Comments

@gtebbutt
Copy link

gtebbutt commented Mar 9, 2021

I understand if this isn't considered a major/breaking issue as per #669 - even if not, I figured it's worth making a note of.

Input on the tvOS simulator (I haven't yet been able to compare on real hardware) has a few issues: using touchMove, the input is registered but the coordinate system seems fairly odd. The clientX (or pageX, both return the same) and clientY numbers both seem to return anything from around -900px to +2100px, on a 1920x1080 canvas. I haven't yet been able to cleanly figure out the limits or origin of the axes in order to make use of the events.

Running the gamepad example code from https://impactjs.com/ejecta/gamepad causes a runtime error which appears to stem from the gamepad.id call. Removing that allows the code to run, however the only gamepad (the simulator remote) registers as extendedGamepad rather than the expected microGamepad and doesn't register any inputs at all.

Other than that, the library still seems to be doing a great job, even on tvOS 14 - so any advice on the input handling would be very much appreciated!

@gtebbutt
Copy link
Author

gtebbutt commented Mar 9, 2021

I've been able to test on real hardware now, and it does appear to be a simulator-specific issue with the gamepad. It looks similar to robreuss/VirtualGameController#9, but even with repeated active polling for a second device to be added to GCController.controllers, nothing comes up. The dead extendedGamepad persists, and no microGamepad is added - it's not just the connection event missing, as in that issue, but the remote as a whole.

For now, I'm continuing to work on actual hardware instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant