First person controls for GoogleCardboard

Hi guys,

Im trying to make the FPS controller from standard assets work with google’s VR SDK. by making google VR SDK’s “GVR main” prefab a child of the FPS controller and removing the camera and audio listener components from the FPS controller, this actually works quite well, allowing me to move and look independently. However, for my game I prefer a set up in which my head movement causes the FPS controller to rotate, so hat forward movement on the gamepad will always correspond to the direction my head is facing. To achieve this, it is common sense to make the FPS controller a child of the GVR main prefab, rather than the other way around. However, this causes some problems. When I set the FPS controller as a child of GVR main, controls break. the FPS controller can no longer move, because it is stuck to the GVR component. Im sure the solution is simple and ill probably figure it out soon, but just wanted to throw this out there as a resource for myself and other people experiencing the same issue, If you have any ideas, please let me know. Thanks!

edit: I noticed that included int he Google SDK, there is a GVR adapted prefab as well as a GVR Main prefab. What exactly is the difference?

Hayk

I tried making my player the child of GvrMain/Head. This works perfectly well and my player shoots in the direction it looks. The direction is now controlled through my head movement.
But here I get an issue, once I look up, my player gets off screen. Don’t know why its not replicating the position of GvrHead at this point.

Any help is highly appreciated

follow the tutorial here xD

https://omniversegames.wordpress.com/2016/02/11/how-to-add-a-first-person-controller-to-google-cardboard-prefab-unity-engine/

it’s works for me xD