Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Giantbean · Jul 27, 2020 at 03:36 PM · vrmultiplayer-networkingnetworkplayerlan

VR Multiplayer Mirror LAN?

It is terribly hard to find information on how to do VR networking. With UNet in depreciation (HLAPI and LLAPI not shipped in 2019.4) and Netcode being unclear about LAN in its current state, I am trying to use Mirror and I am working with SteamVR for its excellent player hand controls. I have tried to figure out stackexchange information, WireWhiz demos, and countless other bits and bobbles of networking info on the web and I just can't get any of these scripts or ideas to work. So I ask, plead even, does anyone have any information on how to network VR with SteamVR 2.2+ preferably using Mirror for a LAN only set up?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Llama_w_2Ls · Jul 27, 2020 at 06:01 PM 0
Share

Photon PUN (third party plugin) has good documentation on LAN setups and matchmaking, as well as a list of platforms they support. Check their website and see if they have docs for VR.

avatar image Giantbean Llama_w_2Ls · Jul 29, 2020 at 02:15 PM 0
Share

Thanks I am currently avoiding Photon as it is not approved for use on this project. Hence the need for $$anonymous$$irror.

4 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by GetLitGames · Jul 27, 2020 at 09:04 PM

Start with one of Mirror's simple examples and build from there by adding the SteamVR rig into the scene and figure out how to network it. VR is not that special, you need to learn the basics first. There may be a few things particular to VR but nothing that prevents you from implementing basic network functionality.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Giantbean · Jul 29, 2020 at 02:23 PM 0
Share

Thanks. I know I am diving into the deep end here without making other multiplayer projects first. I have Looked at Dapper Dino tutorials for $$anonymous$$irror and I am looking at the example files again based on your suggestion. I have however heard in multiple posts that VR is a different beast as the SteamVR player rig moves its location in the hierarchy on start and each player requires multiple network transforms to track the H$$anonymous$$D and two controllers. I have a networking player script to spawn heads and hands on the LAN but they wont follow the players position.

Some progress has been made here: https://forum.unity.com/threads/multiplayer-with-steamvr.535321/#post-6144678

avatar image GetLitGames · Jul 29, 2020 at 06:20 PM 0
Share

To me, Photon Bolt is superior to most networking packages and I don't know much about mirror but all you want to do in the beginning is get some objects position and rotation syncing. This is no different regardless of VR or anything else. To help isolate you from this confusion, you can create your own gameobjects that represent the player's body and hands. Those should only contain the visible meshes and not be part of the rig. Next, write a component that gets the position and rotation of the rig objects you need and simply keep their position and rotation updated to be the same as the rig objects. That will keep you from worrying about the rig and what it does with the objects and show you that you just need to duplicate the positions and rotations. As far as complexity, if you mean that a rig will need more than one object to be synced then yes, of course. Normally a "player" in a game is simply one object that need to be synced but for a VR rig you will sync multiple objects. I still don't see any more complexity though, its just more objects to be synced. You are just repeating the same task multiple times.

avatar image Giantbean GetLitGames · Jul 30, 2020 at 01:50 PM 0
Share

Thanks. I think its more then isolating confusion when making the game objects for networked representations of the head and hands in VR; at least when Using SteamVR hands as you don't want to duplicate the entire VR rig as you said. The trick is not the syncing of these parts over the network but the proper movement of these parts locally. Where the issue arises is that the proxy parts are spawned in when the network is launched but the links I have made to my rig for translation or rotation and position break because the Player Prefab has moved when SteamVR initialized at the start of the game. I'm trying to work through this on the linked forum post and at this point I am probably missing something super simple by overthinking things. So yes its no more complex then repeating the same task multiple times once it works however the task isn't working once with my VR tests even though it works fine in my non-VR testing with $$anonymous$$irror examples and tutorials.

avatar image
0

Answer by ReverendDanyul · Jan 12, 2021 at 09:11 PM

Wondering if you had any success with Mirror, as I am looking at this exact situation. (Project MUST be local network only).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Giantbean · Jan 13, 2021 at 02:13 AM

Yes I used Mirror for a LAN only VR game. One key thing in VR is that the network player is not a single object but a networked head and two hands. This requires a little bit if a different set up then standard networking but the essentials of things like rpc's and authority are fairly standard. For me I had to use a plug-in from First Gear Games patreon called Flex Network Transform or FNT as the standard network transform in Mirror is not very good.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GetLitGames · Jan 13, 2021 at 02:40 AM 1
Share

Ultimately all networking libraries are about sending data. They also usually have some sense of ownership, so that only one machine can make changes to an object. It's nice they give you helper components that do things for you but not necessary once you get more familiar with whats going on. The little bit of code they do to send/receive and update the transform and rotation you could write yourself easily. You don't really need a component to attach to 3 objects, you could handle it yourself and send/recv data to update the positions and rotations but it's nice they give you components that do that. So it's really just a matter of learning the library and following a tutorial. Photon Bolt is probably the easiest to use I think. VR is no different from anything else, you just feel that way (and others trying to start multiplayer networking) because most examples show one gameobject as the player's body. For the position and rotation, which are floats and change rapidly, they should be in state and not RPCs/Events. Bolt also has smoothing/interpolation, it's just a setting to turn on. Bolt also has compression but it's optional. Photon Bolt already has some easily understandable concepts and UI similar to what I saw in the Flex Network video I found, but better, and is probably more performant/efficient than what I saw described too. But again, its nice that someone made a component thats easier to use/understand rather than doing $$anonymous$$irror tutorials. I also tried to look at $$anonymous$$irror but Photon Bolt already has all the features and is easy to understand but it's not free.

avatar image Giantbean GetLitGames · Jan 13, 2021 at 03:57 PM 0
Share

Thanks. Learning a lot more about networking and now doing a non VR networked game they are very similar. I still feel VR has some significant differences that need to be addressed and using discord to discuses this with others I have found many times where non VR developers failed to understand this, (even giving wrong information and misleading direction that luckily other VR developers helped me correct) however there is enough in common that your point stands. As for Photon, its paid and was not approved for use in my project. Also not the best at offline LAN only connections needed for my project so $$anonymous$$irror was still a better option for me. @ReverendDanyul Check my link in the accepted answerer, study networking generals as SubtleTechnology suggests and join the mirror discord. Good luck.

avatar image GetLitGames Giantbean · Jan 13, 2021 at 04:05 PM 0
Share

If you are doing VR, try the HumanoidControl asset - they already support most libraries and they stream the positions/rotations ignoring the friendly components. Definitely more efficient than using RPCs/Events but less efficient than if they used Photon Bolt States instead. I was asked to implement Photon Bolt for a client using HumanoidControl but then I saw they already had it and we used that instead. So if you're doing VR, checkout Humanoid Control and see if that works for what you want to do for a player body because it's network-ready via multiple libraries and you can focus on your game instead of how to network the player's body.

avatar image
0

Answer by ryanology · May 25 at 06:33 PM

I'm in the same boat now that you were in a couple years ago. Need to get Mirror working for a multiplayer VR LAN project. Only thing is, for the life of me I can't get it working properly. Any way you could share your code or contact me to help me work through my issue @Giantbean ?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Giantbean · May 28 at 02:11 PM 1
Share

For others who view this post, ryanology and I chated and he worked out the issue with https://forum.unity.com/threads/multiplayer-with-steamvr.535321/#post-6144678 and made sure the childNetworkTransform was set up on a parent networked objects with the child objects set in the inspectors target field.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

174 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Making a LAN server browser 1 Answer

Player ReSpawn Logic 1 Answer

NetworkAnimator.SetParameterAutoSend, no sync.... 1 Answer

Setup Custom Multiplayer Joining 0 Answers

What technology should I use to play through Radmin or Hamachi? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges