Forum Discussion

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

NetworkView Camera Control

Hi,

I wanted to implement a solution for displaying an undistorted image of the Rift's view for other people to see what the person wearing the Rift is seeing.
Reading through different posts, it seems the best way to this in Unity is to set up a NetworkClient that is in "SpectatorMode" and thus only receives the camera transforms of the Rift (which is running on a seperate machine).

Being quite new to Unity I watched different tutorials on networking and I'm able to set up a simple scene where a camera follows a standard unity firstperson controller via network. - yay.

When I try to adapt that same scene for the Rift it doesn't work at all. It seems like no controls are being updated via NetworkView.

Any ideas on how to achieve this or anything similar?

Thanks!


Edit:

I think i should ask the question differently:
Right now I export the same Scene twice, once with the OVRPlayerController enabled, once disabled.
I do this to get the different views). It seems like as soon as I disable the OVRPlayerController for the "spectator" version, the transforms of the PlayerController dont update. Which makes perfect sense.

But I have no idea how to "choose" between the Rift-View and a normal camera without disabling the OVRPlayerController.
Any help appreciated!

2 Replies

Replies have been turned off for this discussion
  • Just a thought, but instead of having the entire player controller disabled at startup try having the left and right camera's disabled.
    This way you should still get orientation and positional information from the camera controller, but no image output.
  • Thanks Mike!

    It's weird, I had tried what you suggested via script and it didn't work, after reading your suggestion I tried exporting two versions again by manually disabling only the camera component within the left and right camera (to keep the OVRcamera script still active) and it works like a charm!