cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the network in unity 5.2?

Nebouw
Explorer
At the moment we are busy with developing an multiplayer option for our unity 5.2.0 application that will work with the Oculus DK2.
We followed multiple tutorials on the internet, but we keep encountering the same problem. When we try to multiplay (we open the scene in a Unity build and in Unity itself) two OVR players spawn in the scene, this is okay, but they both look through the same camera of player 1. It is possible to move the players around independitly from each other, but they both use the same camera. When we were searching for the problem we noticed that the second player is missing the script ‘ovrmanager’ and we think this could be the problem.
We also tried using the first person controller from the standard assets and that didn’t give any problem.
The prolem with the camera seems to be a common problem and we tried multiple tutorials, but none of those seem to help us. Can somebody help us with this problem or send us in the right direction?

In the link you can download our scène, we have the 2 players in PREFAB.
The normal player does work, and the OVR player doesn't work, i don't know why.

http://we.tl/jDw1ZARSX9
1 REPLY 1

vrdaveb
Oculus Staff
OVRManager is a singleton that is meant to be shared by all our other scripts. We add it to the OVRCameraRig and OVRPlayerController prefabs for convenience in cases where you only have one OVRCameraRig in the scene. If you are adding and removing OVRCameraRigs at runtime, you need to move the OVRManager script to a stand-alone GameObject that doesn't get destroyed.