Forum Discussion
robertsonce
9 years agoExplorer
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!
14 Replies
Replies have been turned off for this discussion
- robertsonceExplorerLast update. All is working with the following: Unity 5.3.5f1, Utilities v.1.3.2, OVR 1.3.2, SDK 1.4.0, Windows 10.
- robertsonceExplorerThank you all for your help!! I have finally fixed it. Frankly not sure whether it was a clean install (and reversion back to Unity 5.2.1.p2 + Oculus Utilities 012 beta + runtime 0.7) or adding the "simple mouse rotator" script as a component to the GameObject parent (with OVRCameraRig as a child). But it works. Screenshot of the final product attached for reference.
This does, in fact, feel horribly nauseating.
Thank you all again! - MikeFTrusteetry just skipping the OVR rig all together. Make sure vr is enabled in the player settings, create a normal camera and place it as the child GO of the object with your mouse look script.
- robertsonceExplorerBTW, I'm not building this -- everything I've described takes place when the editor is playing.
- robertsonceExplorerYou 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... - vrdavebOculus StaffLooks 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?
- robertsonceExplorerThanks 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. - vrdavebOculus StaffLooks 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.
- robertsonceExplorer
- robertsonceExplorerHmm. 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
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device