Forum Discussion

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

Merging existing camera with Oculus Prefab

If this has already been asked, please point me in the right direction. I'm trying to convert pre existing cameras with the Oculus prefab. I'm not sure how to convert the camera to stereoscopic and still keep my presets, such as Flare Layers, Color Correction, Bloom, etc. At the moment I am trying to get the Oculus to work with the "Bootcamp" demo from the Unity Asset Store, but move the camera to the soldier's eyes and keep the presets on it. Any advice or tutorials?

5 Replies

Replies have been turned off for this discussion
  • xhonzi's avatar
    xhonzi
    Honored Guest
    Are you using the CameraController Prefab or the PlayerController Prefab?

    Dropping the CameraController on as a child of the pre-existing camera is usually 90% of what it takes.
  • You should be using the Oculus prefabs, not any existing cameras. There is a lot of custom code we created for the stereo 3D and Rift support, and there is not point in you trying to recreate this effort (and probably getting it wrong). Just start with the OVRPlayerController and OVRCameraController prefabs and port over any code you already had in your project. You should be able to add any image effects or other components onto the CamerLeft and CameraRight inside the OVRCameraController.
  • The end goal here is to have a fully modeled character with the Oculus as well. I want a multiplayer experience. I was trying to use the soldier model already in the bootcamp demo with animations and movements already set and simply add in the oculus camera for his eyes. If the presets are too difficult to transfer over (like the bloom, etc.) does anyone have any suggestions for taking the oculus camera and putting it in the soldiers head and still having everything else function like normal? (shooting, ducking, walking, running, etc.)
  • You should start by pulling the OVRCameraController out of the OVRPlayerController prefab. Don't use the OVRCameraController in the prefabs folder as it does not work (on the 0.3.1 release). Place this inside the soldier's head. In the "FollowOrientation" parameter of OVRCameraController, drag in the solider's body (or whatever moves). You may have to edit the scripts a bit depending on how you want turning and looking to work, but that should get you started.
  • drash's avatar
    drash
    Heroic Explorer
    "cybereality" wrote:
    You should start by pulling the OVRCameraController out of the OVRPlayerController prefab. Don't use the OVRCameraController in the prefabs folder as it does not work (on the 0.3.1 release).


    That's good to know. :o