Skip to main content
Up and Coming
September 7, 2014

Setting up Camera inside a vehicle?

Hi all,

Simple question really. Is there a tutorial on how to get the Oculus camera prefab to work inside a moving vehicle like a plane that's controlled by the player?

I can't seem to find an exact tutorial for how to lock it say, inside a cockpit. Or any info on what the best practice for this would be. Im trying to create a simple flight sim!

Im very new to Unity, so be nice! ;)

Thanks in Advance!
    This topic has been closed for replies.

    3 replies

    Up and Coming
    September 7, 2014
    there is very little to it actually.

    you want to make sure you compensate for the position in front of the cam first, so find out where your players head is when he centers (intro screen!) and then adjust the camera controller to a position that leaves the player head where the car seat is.

    then make the cam controller part of the car, so that it moves with it. on the camera controller you have a field "follow orientation", there you will want the car so that if the car turns the player is turned with it.

    I am very likely forgetting something - but it's not all that hard.
    check out my Mobile VR Jam 2015 title Guns N' Dragons
    djack77Author
    Up and Coming
    September 8, 2014
    Thanks,

    It seems I was doing it correctly, however I thought it was not working, as in Unity when I play my demo scene within Unity the OVR Camera is just grey, it displays nothing, unless I build the scene and play using the .exe. Strange!
    i5 Haswell @ 4.4Ghz Twin Frozr 780Ti RoG Maximus Vii Avexir Blitz C9 2133MHz
    Up and Coming
    September 8, 2014
    I have been having this issue as well. Namely, most of the time I try and play the game within unity, the game window is just completely black. If I re-launch unity, it works fine... once. After that, all black. So I think this is a bug with the in-unity rendering more than anything
    VRJam game: GravWing Racing! viewtopic.php?f=51&t=3480