I made a scene that works fine with the standard First Person Controller using The CharacterMotor, FPSInputController, and MouseLook scripts, creating a Main Camera, CameraController script with a Player game object, and setting the First Person Controller as the Player as per this tutorial: http://unity3d.com/learn/tutorials/proj ... the-camera
I initially tried to replace the First Person Controller with the OVR Player Controller, but neither the mouse nor the keyboard did anything. I tried just about every fix I could find on the forum to no avail and ended up getting my scene to work with the DSK2 (as well as without the DSK2 - displaying a split screen on a monitor) by making the OVR Camera Rig a child of the First Person Controller, creating a Player game object in the OVRCameraRig script, and setting the First Person Controller as the Player.
The problem is that if the mouse looks higher than straight ahead the screen goes black. Another odd thing is that every time I run my scene it raises the Y transform position on the OVR Camera Rig by 2 and will not let me reset it unless I disable the OVR Camera Rig, enable the Main Camera object from my initial scene and run it once that way. So far the only way to avoid the screen blacking out is to set the Axes in the MouseLook script to MouseX.
I tried adding the MouseLook script to the OVR Camera Rig and messing around with the Axes in both areas as well as messing with every value in the OVR Camera Rig and First Person Controller as, but no matter what I change if the mouse looks higher than straight ahead the screen goes black. I would have to say this has something to do with Unity and the OVR assets rather than my computer or the DSK2 because it does the exact same thing on every computer I run it on and it makes no difference whether I am actually using the DSK2 or viewing it as a split screen on a monitor.
Im sorta in this same space my self. Trying to create a custom player. Im a noob so if this seems stupid, I apologize in advance. 🙂
In debuggin my thing, I verified that the OVR Player Controller works and that my project inputs were not broken by creating a simple scene. A flat terrain, directional light and cube to look at. Drop the OVR Player Controller in that scene. Build it Test it with the HMD.
If this DOESN'T work, then create a NEW project with the new scene. If the new project works, then your project has some broken settings, look at the project settings->input and compare to fresh project..
So far my customer player doesn't work right either, but I had an epiphany in the shower this morning that I have not yet had a chance to explore.
What I really want is the Character to MOVE in the direction the mouse is turning, but the cameras look\position should come from the HMD position tracking. I sorta have this now with keeboard input but its like a TANK.. where I can use the move keys to drive around the body but the mouse turns the camera like a tank turret, adding in the HMD position trakcing and its a mess.. 🙂
I feel like Im completely redoing the OVR Player Controller but I cant get my custom faux gravity scripts to work on the OVR Player Controller at all.. see tut (https://www.youtube.com/watch?v=gHeQ8Hr92P4) I want my character to walk along the outside of a sphere..
I have most of it working with the OVR Camera Rig, just not mouse look for steering.
I'm not using the OVR Player Controller at all as I could never get it to work, I'm just using the OVR Camera Rig with the standard First Person Controller. While I get a consistent black out if the Y axis goes positive I realized I am still getting a lot of blackouts in various spots on the X axis and they seem to vary by where I am in the scene, so my partial fix wasn't so great. I added MouseY back and limited the Y value for the MouseLook script component to a maximum value of 0 to avoid the looking up black out, and if I look down at the maximum 60 degrees and I can continuously rotate 360 degrees without blackouts, but if I am looking level I may be blacking out in up to 160 degrees of my rotation. I imagine it has something to do with the way the OVR Camera Rig is set up, maybe the whole head/neck thing I was reading about in other posts.
Yeah, Id focus on getting the OVR Character Controller to work. There are two simple code changes required in unity integration package but they are simple.
Could you post a link to the code changes for the OVR Player Controller and I'll see if I can get it to work. Also, my Unity project is on my hard drive rather than a URL, so I'm not sure how to attach it here. I also assume you'd need the scripts, materials, textures, and prefabs in addition to the scene.
I think this is some kind of problem with the association between the camera rig and the player controller and that the black out is occurring because the camera is being obscured by the capsule at certain points.
I got the OVR Player Controller to work by making it the Player in the OVR Camera Rig script, but now it blacks out whenever the Z position on the OVR Camera Rig is negative. I also can't look up or down at all and the space bar button brings up some weird menu instead of jumping.
By adding the Mouse Look scripts into the OVR Camera Rig and OVR Player Controller and limiting the Y axis (so I can't look up) I can get it to work the exact same way I did with the First Person Controller.
By navigating around and watching the scene view it seems the lateral blackouts occur every time the blue arrow (Z-axis) on the OVR Camera Rig goes into a wall, so the blackouts from the negative Z positions were just a coincidence to my starting position and where the wall was behind me. Also the OVR Camera Rig transform still wants to keep making the Y position transform 2 higher every time I run it. It seems the controller and camera rig just don't want to stay in sync and I have no idea why.
Thanks for the advice. I originally tried using the First Person Controller a few weeks ago because of your post, and I actually made the changes to FPSInputController.js and linked the CenterEyeAnchor into the centerEye variable a few hours back (forgot to mention it.) It did stop the camera rig from changing positions every time I ran the scene. Setting the OVRCameraRig to position all 0 and rotation all 0 makes me feel like a mouse in the scene, and while it allows me to look up slightly if I was not too near a wall getting 30 degrees at best in a few limited spots, I still black out near walls. I even deleted all the player controllers and the camera rig then imported everything from scratch and tried following your instructions again. Same thing.
I've literally tried hundreds of combinations of camera rig and player controller transformation positions in conjunction with different MouseLook settings, but no matter what I do if my back is against a wall the screen will black out unless I'm looking down about 30 degrees. By limiting the Y-axis to -32, there were only a few spots when my back was to a wall edge where I blacked out, but that made me feel like I was running downhill so it's not a good fix. With the camera rig and player controller anywhere between a Y value of 2 to 8 (my ceiling is at 10) it always blacks out if the Y-axis is positive, but I can live with limiting the Y-axis to 0, unfortunately my display is still blacking out if my back is too near a wall and I'm not looking down enough. The further I get my back away from the wall the higher I can look.