Search Unity

HTC Vive SteamVR UNET multiplayer basics

Discussion in 'AR/VR (XR) Discussion' started by WavyRancheros, Aug 10, 2017.

  1. WavyRancheros

    WavyRancheros

    Joined:
    Feb 5, 2013
    Posts:
    176
    Hi,

    I want to implement a HTC Vive multiplayer game, using UNET. At first it's only supposed to be run in my local network with two PCs and two Vives (which use the same two lighthouses). I'm basing everything on the SteamVR Interaction samples, meaning a Hand component is detecting the closest Interactable component and sending messages like "HandHoverUpdate" or "HandAttachUpdate", and a Grabable component receiving those messages calls Hand.AttachObject(Interactable i), Hand.DetachObject(Interactable i), Hand.HoverLock(Interactable i), Hand.HoverUnlock(Interactable i), etc.

    I already dived into the Unity Networking documentation, but I'm confused.

    The basic concept is: two players can manipulate the VR world. Grab anything, throw it around, etc...

    So I guess all the Grabable objects reside on the server, and are spawned on the clients, while the "Hand" sends commands. They are probably considered the "Enemy" in all those networking examples? The Hand is my "player"?

    Methods on the HTC Vive Controllers, like Hand.AttachObject(...), would become [ClientRpc] RpcAttachObject(Interactable i), right? And the messages like HandHoverUpdate would turn into [Command] CmdHandHoverUpdate()?

    Do all grabable objects have to be spawned by the server, and have a NetworkIdentity and NetworkTransform attached? If I have 2000+ objects, isn't that a problem?

    If the GameObjects have unique names, would it make sense to avoid NetworkTransform, NetworkIdentity and spawning, and just have them locally on the clients, and just send a custom message with the name and transform details across the network?


    I hope this was clear enough so that some people can reply to this.

    Thanks in advance,

    Wavy
     
  2. Cibum

    Cibum

    Joined:
    Feb 9, 2017
    Posts:
    2
    I wish this post would have an answer
     
  3. mkerlau

    mkerlau

    Joined:
    Sep 25, 2018
    Posts:
    1
    Hello,

    I'm stuck with the same probleme, thinking if it's worth it or not to reimplement SteamVR functionalites on my own.
    Do you know if someone get a solution on this ? (updated for the new SteamVR binding system)