How to get input of VR head movement??!!
My question is how to get VR head movement?!!!
Answer by Baroque · Apr 21, 2017 at 06:23 PM
If you have set up your project for VR correctly (follow the VR tutorial) then your main camera will update its transform based on the orientation of the VR headset automatically!
You can get at the main camera using the Camera.main
helper property:
// For example...
Camera headsetCamera = Camera.main;
Vector3 headsetForwards = headsetCamera.transform.forwards;
From there you can do whatever you like--it's a standard transform like on any GameObject.
Thanks @Baroque.... Do you know any way to create a VR FPS with these information?!!!
That's a pretty big question. :) I would start by learning how the CharacterController works. You should be able to find some tutorials on how to make a normal mouse-and-keyboard FPS. From there you can try making your VR camera a child of the CharacterController and drive the character around based on which way you're facing. Good luck!
Your answer
Follow this Question
Related Questions
Сursor Center of screenand toggle on and off (Unity 5) 0 Answers
Set the username with an inputfield ? 3 Answers
How do I start a Coroutine without having an instance of the script? 1 Answer
Player Movement - Not moving at all 3 Answers
[Hololens] Connecting using Unity's UNET doesn't work after the first time connecting 1 Answer