Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How do create a multiplayer VR scene with Oculus?

Discussion in 'AR/VR (XR) Discussion' started by Tezelian, Jun 27, 2018.

  1. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    I want to develop an environment where up to 4 different players using their VR headsets can connect into one scene simultaneously, ideally 4 players.

    I did some research and found two packages on the Unity store called 'multiplayer VR kit paintball' and instantVR edge that unfortunately only support the HTC vive with its SteamVR plugin. However I don't have a HTC Vive, only a Oculus Rift.

    Is it difficult to set up multiplayer within VR in Unity using the Oculus? What tutorials can I follow or books can I read, anything that can help me save time and learn rapidly if not what can I do and how can I learn? Are there any plugins from Oculus I can use?

    Regards
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't believe platform has anything to do with it. You are trying to make a networked game; the fact that you happen to be making it for Rift doesn't change it at all.

    So, dig into the Networking tutorials and have at it!
     
    ModLunar and Tezelian like this.
  3. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    Yo
    You are correct this is what I will do from now and I also downloaded Photon Unity Networking and will look into that too, thanks so much :)
     
    JoeStrout likes this.
  4. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Read up the documentation for the Oculus Platform SDK on the oculus developer website. The Platform SDK contains support for this kind of things (like an easy to use P2P network stack, matchmaking, user invites etc) and comes with a unity package to integrate those things in Unity. Only thing is when going that route, you have to work with the Oculus server and people have to be oculus registered users, so this is between Rift, GearVR and Oculus Go only
     
    Giantbean, Salazar and JoeStrout like this.
  5. danielhampikian

    danielhampikian

    Joined:
    Nov 12, 2017
    Posts:
    1
    You can check out this tutorial series I did on this and I'm currently making one for oculus and photon with updated versions this summer:

    -Daniel
     
    ModLunar likes this.
  6. neonydas

    neonydas

    Joined:
    Sep 20, 2018
    Posts:
    1
    such a shame you didn't finish the tutorials, the once you have are gold (there is really no other material for VR multiplayer in unity
    )
     
  7. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    @JoeStrout you say the platform shouldn't have anything to do with it but I don't think that is true. Most network games spawn the player and run controls on that player but for VR the player is already in the scene with heads and hands. You spawn a proxy set of head and hands that then follow the local players HMD and controller to show the position and rotation of that player to other players (For parts to a single player rather then one). @danielhampikian that's what you are doing in your video right?
    My trouble is I am using SteamVR player prefab with Mirror (UNets needed replacement and stop gap as Unity gets NetCode production ready) and while I can spawn objects with network identity and network transforms they simply don't follow the SteamVR player. I have dug into networking tutorials but that's not enough. As @neonydas states, more material is needed for VR multiplayer as even the above video is specific to Oculus, is not yet finished and doesn't translate to Vive/Index well enough for my understanding.
    To further muddy things we have differences between tools like Photon and Mirror, etc So when you are stuck using Mirror, SteamVR and Vive on a project and a great tutorial for Photon with Oculus comes out it can be disappointing that the best advice people have on so many forums seems to be as rudimentary as "get gud".
    So if anyone finds this as they are searching and they feel lost as I do I will say that another thread has pushed me further along and while I don't yet have the answer I will do my best to share what answers I glean on that thread.
    https://forum.unity.com/threads/multiplayer-with-steamvr.535321/