Crouch in VR, moving down the camera C#
Hi, I have a problem implementing a crouch action in VR.
I just want to make when the player press CTRL, camera goes down 0.5 units on Y axis.
I've done this and it works perfect without VR:
if (Input.GetKey (KeyCode.LeftControl)) {
camara.transform.position = camarapos - crouch;
}
if (Input.GetKeyUp (KeyCode.LeftControl)) {
camara.transform.position = camarapos + crouch;
}
but when I turn on oculus and play the game, the camera goes down phisically, but there are no changes on the player view as you can see on the image:
https://media.giphy.com/media/xUA7b4eEf2Y3kyd6AU/giphy.gif
As I've seen, on the camera transform in VR, the coordinates changes every frame, because the reposition of UMD, so maybe that is the problem.
I know this should be made using animations, but I would like to know how to do it for example if someday I want to make camera player move to certain position or force player to look some point.
Does someone knows how to fix this?
Your answer
Follow this Question
Related Questions
Trouble With Free Movement & Camera in Oculus 0 Answers
Unity 5.2 VR Camera Problem 0 Answers
Hi I'm trying to build cardboard APP i have an question 0 Answers
camera movment 0 Answers