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