Updating Multiplayer Tutorial with VR
If I want to put a Rift on each of the players in this demo to give a FPS experience, how do I combine it in my prefab to make sure it spawns correctly? I cant seem to get this to work. Any help is appreciated!
What tutorial are you referring to? What prefab?
You are literally giving us no information here. ;)
To make a game run in VR mode in Unity all you have to do is check the "Supports VR" in the Player Settings. When a device is properly connected, the build will render to the VR Device.
All cameras will then render proper stereo according to the measurement settings in the VR device app. That being said, if you have a working player with a camera on it, it will work normally with the Rift once you enabled it.
If you have anything else working correctly (the normal monitor multiplayer game) then this will be no problem.
$$anonymous$$ake sure you have the latest drivers for your devices and all that. But those things have nothing to do with Unity. All you would have to do is enable VR in the player settings.
The "Supports VR" is great and there is a lot more about Oculus and Unity, please take a look at Oculus Utilities https://developer.oculus.com/downloads/game-engines/1.3.0/Oculus_Utilities_for_Unity_5/
VR support for the game is more complex than it may seam first, more info is here http://gamasutra.com/blogs/SemenFrish/20160324/268862/Virtual_Reality_Tips_for_Engineers_and_Developers.php :)
It's not that complicated for the cause of this question but I know that for a sophisticated VR game it's not as simple as switching a button :P
Sorry! I was referring to the Unity3d $$anonymous$$ultiplayer tutorial here: http://unity3d.com/learn/tutorials/topics/multiplayer-networking
I understand how to enable the VR in general, and I have been able to add oculus support for my single-player games. In most of those examples, you delete the main camera from the scene, and add the FPS controller asset..unity handles the new VR camera support automagically.
But, with the networking demo your characters are prefabs, and I am not sure how to include the correct camera rig so they both players can wear an oculus on different instances of the game. When I add the FPS controller to my prefab, it gives me a black screen.
Oh ok, I haven't done any VR recently since the launch of the Rift so what works for the D$$anonymous$$2 perfectly might not work for the CV1 (although it should).
I normally just use the cameras that are nested in the player prefabs I created for the non-VR game without using anything from the Oculus SD$$anonymous$$. That's sufficient for testing in my cases. The tracking works, the turning works, everything works like a charm. So theoretically your multiplayer game should work just the same liek it does in non-VR mode, when using the non-VR player prefabs and just enabling VR (try it for the sake of testing maybe)
"automagically"...I like what you did there :P
I still use the D$$anonymous$$2 with the 0.8 runtime and that just works without tweaking anything. It should be the same for the CV1 but I can base that on absolutely nothing since I don't have a CV1 and can't test it myself.
Cheers
Answer by 7a · Apr 17, 2016 at 03:21 PM
Actually I'd need much more information how is existing tutorial done and which prefab meant OVR controller or another one? I'd suggest to take a look in Networking Overview in help http://docs.unity3d.com/Manual/UNetOverview.html it may be helpful anyway :)
Your answer
Follow this Question
Related Questions
Multiplayer game for Gear VR - multiple players 0 Answers
Multiplayer tutorial 2 Answers
Unity multiplayer tutorial - Adding a respawn button 0 Answers
Tutorial on Button Mashers 0 Answers
Multiplayer networking for Android 0 Answers