Skip to main content
Participant
June 13, 2016

Use mouse to control Oculus scene -- problems with Y axis

Hey guys,

Here's my question: How do I use the mouse to all directions from a first person perspective, and display the product in the Oculus?  Would really appreciate any new tips!

Details:

Before clicking "virtual reality supported", the first person character in my scene can look up/down/right/and left using the mouse or joystick. After turning on VR support (with an Oculus DK2 plugged in), I can only look left or right in the scene using the mouse.  I've lost control of rotation along the y-axis (looking up and down).  Critically, I can still look all directions using the Oculus.

This is, of course, unconventional.  It's for the purpose of a neuroscience experiment (need to be able to separately manipulate the visual / motor input in the VR scene).  

My system details: Windows 10, Unity 5.4.4p1, Oculus DK2, Runtime 0.8 (same problem with 1.3)

Thanks for any help!

This topic has been closed for replies.

14 replies

Participant
June 13, 2016
Quick edit:  I'm trying to get control of the pitch axis in the Oculus using a mouse or joystick.  Thanks again!
Inspiring
June 13, 2016
create an empty GO and make your camera object a child of it. Attach the mouse look script to the parent and you should be good to go. Get ready to feel sick  :)
Participant
June 13, 2016
Thanks so much for your help, Mike!  

I did as suggested (screenshot attached), but still have the same problem (can look left and right in the scene but not up and down).   Any further suggestions?

Thanks again,
Caroline
Inspiring
June 13, 2016
Use OVRCameraRig instead of OVRPlayerController.
Participant
June 13, 2016
 Hmm.  This suggestion produced an error: "NullReferenceException: Object reference not set to an instance of an object".  Screenshot attached.  Any thoughts on next steps here?

Really appreciate your help!
Caroline


Participant
June 13, 2016

Inspiring
June 13, 2016
Looks like there is still an OVRPlayerController script instance somewhere in your scene. Might want to right-click OVRPlayerController.cs and choose "Find references in scene" and then delete each one.
Participant
June 13, 2016
Thanks again Dave!  Do you also suggest making an empty GO, adding the OVRCameraRig as a child of the GO, and then adding the mouselook script as a component of the parent GO?  If so, it seems I have to edit the mouselook.cs script to have MonoBehaviour.  Sound right to you?

If so, this is the result of what I think your suggestions were.  No luck!  I'd appreciate any tips on how you'd go about doing this (using mouse to control the x and y axes of the scene displayed in the rift). 




Screenshot above.


Inspiring
June 13, 2016
Looks like you have it set up right! That error is probably from a previous run. Try clearing the console and running again. Does it work when the editor is playing?
Participant
June 13, 2016
You were definitely right about that error being a red herring.  I opened a new project and walked through the same set of steps as described above.  (Screenshot attached).

Now, I cannot rotate in the scene using the mouse input (or joystick input for that matter).

If I replace "OVRCameraRig" with "OVRPlayerController", I can rotate left-right in the scene but not up-down using the mouse (or joystick).

In both cases, I can rotate all directions using the oculus.

Unity v5.3.4p1, Oculus Utilities v1.3.0, OVRPlugin v0.1.4.0, SDK v0.8.0.0

Thanks again for your help!  I've been at this for days...