UFPS & GVR (Google VR)
Hello, I am attempting to use "UFPS" with "GOOGLE VR". I'm trying to change a couple lines of code in the UFPS scripts to allow:
1) Player movement based on camera direction (ex. Camera.main.transform.forward)
2) Raycasting based on the center of the camera (ex. if (Physics.Raycast (Camera.main.transform.position, Camera.main.transform.forward, out hit, Mathf.Infinity)) {
I was able to get this functionality with the "Standard Assets - First Person Controller", but, I haven't been able to get this working with the UFPS Scripts.
In the hierarchy, I have the "AdvancedPlayer" with the "GvrViewerMain" prefab attached to the "FPSCamera"(MainCamera).
When I use "Alt" to "simulate head movement" with the "GvrViewerMain" enabled, the Player's movement and raycast do not follow the camera.
I think it's just a line or 2 that must be changed. But, I am inexperienced with C#. Any help would be greatly appreciated! Thanks in advance.