Hello guys, I am new with Unity so I would like to ask for your help.
I want to use the fps along with the VR google cardboard and make my character move with a controller. I have tried many methods but even when my character was walking with the controller, when i move forward if i look to another direction then the character will keep moving to the same direction as before. I want my character when i look to a new direction and move my controller forward to go forward. If you could help me that would be wonderful. Thank you in advance.
I helps to have a descriptive title. The way your Q is now, people who know about Cardboard aren't going to read past "Hello guys." Another good thing about a title is once you think of a good one, google it and you'll often find other people have asked the same thing. You can read the answers they got.
public float speed = /* some number */;
private CardboardHead head;
void Start()
{
head = // find the CardboardHead
// example:
// head = Camera.main.GetComponent<StereoController>().Head;
// or, make the variable public and use drag-and-drop in //the Editor
}
void Update()
{
transform.position += speed * head.Gaze.direction;
}
source: http://forum.unity3d.com/threads/how-to-do-head-based-steering.311305/
Thank you both for replying to my question! Is the first time asking a question in a site so is good to know. I will have it in $$anonymous$$d next time. I am going to try the solution you gave me immediately. Thank you very much!!!
Your answer
Follow this Question
Related Questions
How can I make my fps controller jump only on the ground? 0 Answers
BasicFPS controller "Can not be loaded" 0 Answers
VR android game controller 1 Answer
fps script not working 1 Answer
VR controller collision with objects 0 Answers