-
Notifications
You must be signed in to change notification settings - Fork 96
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
Keyboard Movement Does Not Follow Direction You Are Facing #24
Comments
That is very arguable point, as a lot of players prefer independent movement direction from view direction. |
If I want the movement as @wlindner described, what should I do to achieve that? I tried to cooperate the original PointerLockerControl.js method, adding back pitchObject and yawObject, as below and in update() function, adding but it doesn't really work. I guess I messed it up with the OculusRiftEffect.js, thus view doesn't really follow the oculus(0 and 360 degree the same, but weird transition between), and the movement doesn't 100% follow the rotation as well. Does anyone know the right way to do this? Sorry for the awful description and hope it makes sense.. Thanks! |
Ohhh I found the solution :D @OculusRiftControls.js @OculusRiftEffect.js see the changes of OculusRiftControls.js here http://jsfiddle.net/jhclaura/abnjvfyc/ |
I've noticed in the "Three.js Floating Boxes Demo" that your perspective follows the oculus rift, but movement with the keyboard does not. So, for instance, when you first open the demo if you don't move your head, UP on the keyboard will move you forward, but if you rotate your head to the left or right, UP on the keyboard still moves the same direction even though you are facing a different direction. This should work similar to the Three.js Pointer Lock Demo http://threejs.org/examples/#misc_controls_pointerlock where UP on the keyboard will move you in the direction you are facing.
The text was updated successfully, but these errors were encountered: