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

WASD / Controller Input #8

Open
IstoraMandiri opened this issue Mar 22, 2015 · 2 comments
Open

WASD / Controller Input #8

IstoraMandiri opened this issue Mar 22, 2015 · 2 comments

Comments

@IstoraMandiri
Copy link

Hi, Loving the VR. Thanks for the library.

Just wanted to ask if you've seen an example of combining this with movement controls, such as using WASD or a Gamepad?

EDIT: it was easier than I thought. Just add something like the following inside requestAnimationFrame

pad = navigator.getGamepads()[0]
if pad
  camera.translateX pad.axes[0]
  camera.translateZ pad.axes[1]
  camera.translateY pad.buttons[0].value*-1 + pad.buttons[1].value
@richtr
Copy link
Owner

richtr commented Mar 23, 2015

I notice that you have closed this issue.

I do think we should explore adding WASD and Gamepad controls to the library (that can be enabled/disabled by the developer as required).

I'm happy to review pull requests if you are interested in contributing. Also, thank you for providing the basis of your research in to gamepad support in the edit to your post above!

@IstoraMandiri
Copy link
Author

Okay cool, I'll re-open the issue - I may eventually get around to sending a PR, but don't let that stop anyone else from going for it!

@IstoraMandiri IstoraMandiri reopened this Mar 24, 2015
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

2 participants