Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
djack77's avatar
djack77
Honored Guest
12 years ago

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!

3 Replies

Replies have been turned off for this discussion
  • Gerald's avatar
    Gerald
    Expert Protege
    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.
  • djack77's avatar
    djack77
    Honored Guest
    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!
  • 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