Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Thank you for the code and link! It did not work for me (and maybe I am missing something), and I have to admit I am a newbie when it comes to vectors and threejs. But maybe I was not asking my question in the right way. What I tried to ask was how can I rotate my characterMesh using the rotation information (only yaw) of my camera (HMD)? If I can achieve that, then moving forward (now into the right direction) by pressing the forward key should work. Basically I want to implement the navigation concept like it is implemented in AltspaceVR which I really like... Commented Sep 8, 2015 at 18:59
  • @ChrisC I've updated the code to match your requirements but it also depends on how you're attaching the camera to the character. Perhaps you would be better of using Three.js' FirstPersonControls in conjunction with VRControls, similar to this: stackoverflow.com/questions/30511524/… Commented Sep 8, 2015 at 19:42
  • I had a look at the FirstPersonControls but it is not what I am looking for. Your updated example did not work for me either. Hmm... I found similar questions and solutions in the Unity3D forum and try to implement them in threejs, until now without success. answers.unity3d.com/questions/498094/… answers.unity3d.com/questions/1028940/… Commented Sep 10, 2015 at 3:09
  • @ChrisC I'm pretty sure my solution does what you want it to. Integrating it into your existing code might be a different problem though. I'll have to see more of your code to figure out what's going on. I've edited my answer with the full source code. You can see a working example here: output.jsbin.com/coboqis/1 Commented Sep 13, 2015 at 13:57
  • Thanks again! Your example works great, as you said. I will see what's wrong with my code... Commented Sep 13, 2015 at 21:07