Forum Discussion
Elecman
11 years agoExplorer
Unity - Mouse look with OVRCameraController
I want enable VR in an aircraft but I can't use OVRPlayerController because the rigidbody interferes with the aircraft. OVRCameraController works fine but it doesn't support mouse look, which I need.
Is there any way around this?
Is there any way around this?
5 Replies
- cyberealityGrand ChampionYou'll probably need to customize the controller. By default, it's mostly geared for a first-person walking scenario. You could even just drop the default Unity mouse look script, but you will need to edit it to get it to work good for VR.
- ElecmanExplorerOk, consider it a feature request then :-)
- ElecmanExplorerAny mouse look script will not work because the OVR scripts interfere with all parent rotations as well. Try to rotate a game object (via the Inspector) which is the parent of the OVRCameraController. It does not have any effect.
Did I find a bug or is this a feature?
Either way, I strongly suggest that this functionality is included in the SDK. Not everyone is making an FPS. Some of us make a game where you sit inside a vehicle and it would be nice to look around without breaking your neck ;-)
Another scenario where you need mouse look in an aircraft is when you enter "slew" (god) mode and you can freely move around, without the cockpit visible. Now you definitely need to enable mouse look to be able to navigate around the world. With the current setup it gets very messy, having to enable and disable different OVR controllers. - cyberealityGrand ChampionThe OVRCameraController rotates directly from the script (the parent orientation will not have any effect). However, you can use the "FollowOrientation" parameter to effectively add a parent to the controller.
- ElecmanExplorerThanks, that did the trick.
For anyone else running into this problem, add an empty game object and make it a child of your vehicle. Then make the OVRCameraController a child of that empty game object (Cam in the screenshot). Then set Follow Orientation to Cam. Then rotate Cam with your mouse script.
cam.png
That feature request still stands though. It would be nice if this would work out of the box.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 9 months ago