cancel
Showing results for 
Search instead for 
Did you mean: 

Unity Oculus Multiplayer

AlexLFC
Honored Guest
Hello,
I'm having some real trouble trying to create a two person (or more) VR experience with the Oculus Rift and Unity.
I'm using the OVRCameraRig together with VRIK, which works really nicely so far as a one player, it's good fun messing around in front of your reflection.

But I'm having real trouble adding a second person correctly. I'm using the Unity network manager to host/client my game and spawn players - this works! Though with each spawn I'm seeing the instance replicate the tracking movements of the local player. On the host, you can see your own body (instance), when the client joins you can see their instance, but it has your tracking movement from their position. And it's the same case on the client - they can see their local body/movement which is replicated on to the other instance. I hope that's understandable.

I imagine that I would need to disable the OVR Tracking on each of the other instances, this works when I disable manually in the Unity player, but being that they all work off the same spawn player prefab I can't get my head around how to disable individually.

I have a script on the prefab [--  if (isLocalPlayer) { Destroy(this);   --] To try and run a script to disable OVR tracking, it works for the host machine - the host is tracking, the client instance is still. I think I'm nearly there - but then it has then also disabled all tracking on the client machine.

Has anyone managed what I'm trying to do - I've been searching for days. So I'm now asking.
Once I've cracked the above I'll then be using Network Transform to send tracking positions to and from each of the instances/clients.

I hope someone has an idea, or better way to do this. Many thanks!
I'm using Unity 2017.3.1
0 REPLIES 0