ExtendRealityLtd / VRTK

An example of how to use the Tilia packages to create great content with VRTK v4.
https://www.vrtk.io/
MIT License
3.69k stars 995 forks source link

[Multiplayer] Sync headset, controllers and player action over network. #30

Closed Dendane closed 8 years ago

Dendane commented 8 years ago

Sync headset, controllers and player action over network.

thestonefox commented 8 years ago

I've not actually used the Unity server tools, I watched a tutorial on it once, seems pretty easy, you just say which variables you want to sync.

It would be possible to view another player's hand and head movements by transmitting the transform of the objects (position/rotation).

It would suffer a latency issue for the view on the other end though so wouldn't be real time movements (I don't know what the lag would be like).

AltspaceVR seems to look decent enough when people move. I've seen people play Rock, Paper, Scissors using the virtual hands (provided by the LeapMotion) so the lag can't be that bad.

Dendane commented 8 years ago

I tried to make ot work and I can get the server ui to show up ingame. But I have no clue how to show the headset and controllers to another player. And then there is a slight problem of not being able to test unless I get a second Vive :/

thestonefox commented 8 years ago

To make the headset and controllers show up, you'd need to have models in the game that would position based on the server variables.

I expect you'd need custom models as the ones in the camera rig wouldn't work (i dont think)

thestonefox commented 8 years ago

This isn't really a candidate for the toolkit. It can be possible to do with using Unity Networking or Photon PUN.

Basically you'd just need an object that was a child of the headset and controllers and is only enabled when the player is not the local player. Have this object transform synced over the network and this should do what you need.