How to Make a VR Multiplayer Game - PART 3

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • Hi guys, in this video I'll show you how to make a Lobby System for our Multiplayer VR game with Photon and Unity. Hope you will enjoy this video! :)
    ▶ Get access to the source code: / valemvr
    ▶ Join the Discord channel: / discord

КОМЕНТАРІ • 114

  • @ValemVR
    @ValemVR  4 роки тому +41

    Hi guys here is a little bonus for you. Below you will find a script that will let you leave the room to go back to the lobby by the press of the menu button on the left controller. Simply add this script somewhere in the Scene Type 1 and Scene Type 2 and you're good to go. Also when going back to the lobby an error can appear with the voice network you can remove this error by going in the "Photon Voice Network" component and unchecking "dont destroy on load". Hope you enjoy this video :)
    using UnityEngine.XR;
    using Photon.Pun;
    public class LeaveRoomOnInput : MonoBehaviourPunCallbacks
    {
    public InputHelpers.Button inputHelpers = InputHelpers.Button.MenuButton;
    public XRNode controller = XRNode.LeftHand;

    void Update()
    {
    InputHelpers.IsPressed(InputDevices.GetDeviceAtXRNode(controller), inputHelpers, out bool isPressed);
    if (isPressed)
    {
    PhotonNetwork.Disconnect();
    PhotonNetwork.LoadLevel(0);
    }
    }
    }

    • @kerfuzzle
      @kerfuzzle 4 роки тому +2

      Remember to make sure whatever you name the script you change LeaveRoomOnInput (near the top) to whatever you name the script!

    • @OstrichLaboratory
      @OstrichLaboratory 3 роки тому

      Great Tutorial but I have a problem. I have just used this code to go back to the lobby, however when I use it to go back to the lobby and change into a different room, it gives me this error.
      [NetworkVoice.PhotonVoiceNetwork] 2021-01-06T01:00:02:An instance of PhotonVoiceNetwork is already set. Destroying extra instance.
      UnityEngine.Debug:LogErrorFormat(Object, String, Object[])

    • @mario123mario123
      @mario123mario123 3 роки тому

      Very Nice.! :D :P

    • @mesmes9424
      @mesmes9424 2 роки тому +1

      Need to add the "using UnityEngine.XR.Interaction.Toolkit;" for the InputHelpers

  • @TheMinecraftgamesNL
    @TheMinecraftgamesNL 4 роки тому +87

    So basically this guys is becoming brackeys but then VR version of it! I like this!

    • @ValemVR
      @ValemVR  4 роки тому +45

      I'm waiting for my pony tail to grow. :D
      Joke aside, Brackeys taught me so much and inspired me to make this channel. I owe him so much.

  • @rifqinaufaltohari9948
    @rifqinaufaltohari9948 3 роки тому

    OMG this is the best VR tutorial on internet

  • @Motorboot-Hoedan
    @Motorboot-Hoedan 3 роки тому +3

    Hi Valem,
    Your tutorials are geat !
    I am just wondering ... are you planning a follow up for this MultiPlayer game tutorial, where you explain how you can add movement (walking around with the thumbsticks or teleporting) in MultiPlayer?

  • @yalukka7400
    @yalukka7400 2 роки тому +1

    If you have problem with hand tracking in lobby: you have to add Input Action Manager to XR Origin and then add XRI Default Input Actions to Action Assets

  • @ProjectCity1
    @ProjectCity1 Рік тому +2

    I have a problem, I can’t find the “friends” anywhere

  • @ypraxy
    @ypraxy 3 роки тому +2

    i need your help. I can not push the Button. It's like it doesn't exist. But i wrote every Script and did everything like you.

  • @pixelb0i255
    @pixelb0i255 4 роки тому +5

    Great tutorial Valem! Keep it going. One ask: can you include how to use the Oculus Avatars in addition to custom models? Just feel the way Facebook is going they’ll use that as a measure. Sucks. Thanks mate.

  • @danielgalli6760
    @danielgalli6760 4 роки тому

    nice tuts valem, apreciate so much what are you doing!

  • @ThePixelitomedia
    @ThePixelitomedia 4 роки тому

    Awesome hope more VR MP tutorials will follow

  • @mkSATAN
    @mkSATAN 2 роки тому

    is it wierd that i was waving to you when i saw your face mate? xD

  • @ItzRyanF00
    @ItzRyanF00 3 роки тому +3

    Can you make a video on a wrist menu that pops up when you click something on your wrist like a watch button?

  • @friedlandMartin
    @friedlandMartin 4 роки тому +1

    Can you make a tuturoial on how to create a newcustom generated room name? So that a friend can enter the same roomname and automaticaly join? Thank you for awesome tutorials as always! peace

  • @samiejaa
    @samiejaa 3 роки тому +1

    Can you plz make name tags over the heads tutorial!!! I also got a question: can you move in this game or should i make that myself???

  • @loganrox9
    @loganrox9 3 роки тому +2

    Just wondering if the next part will contain movement such as locomotion and teleportation as i tried to used the movement from your other tutorials and did not get anything working :P
    also its been a while so will there even be a next part ?

  • @umrahwedde8219
    @umrahwedde8219 3 роки тому +1

    Valem make vr game part 4

  • @HalloGaming
    @HalloGaming 3 роки тому +1

    You should do one with mirror in unity

  • @vishalnaruka4360
    @vishalnaruka4360 4 роки тому +7

    So awesome... You are the next brackeys ❤️.... Can we create a lobby too ?? And i have a request, i wonder if you can make this series a full multiplayer game like create lobby, invite friends, and join multiplayer game together...

    •  4 роки тому +2

      That would be awesome

  • @maxknight2372
    @maxknight2372 3 роки тому +2

    Question I've been searching the internet but I cannot find a way to also use 2d (Desktop) players so you don't need a VR headset to play!!

  • @halbzwilling
    @halbzwilling 2 роки тому

    Lots of love from a bunch of XR 6th semesters :D

  • @AlphM
    @AlphM 3 роки тому +1

    Is there any way to have the client xr rig communicate with that specific players Server Network player? I want to add an effect to the xr rig when the Network player collides with a certain object, but I dont know how to go about it.

  • @ScratchGenius
    @ScratchGenius 4 роки тому

    Thank you so much! Also, can you maybe make a tutorial on how to make this work with Steam friends and stuff like that?

    • @dauz5456
      @dauz5456 4 роки тому

      You would need it to be uploaded to steam and now since they don’t do steam community acceptions anymore you have to pay $100 to have your project uploaded

  • @TXMERMUSIC
    @TXMERMUSIC Рік тому +1

    how could i make continuis movement but for multiplayer?

  • @xiba04
    @xiba04 7 місяців тому

    hello. I am creating a game in which there are 3 types of mode and in each game mode I want there to be a lobby where rooms are created. What approach do you recommend to do that? You can create 3 lobbies

  • @DrDruupLongs
    @DrDruupLongs 3 роки тому +1

    i have a question,
    if u change something in the scene like materials and Set.Active stuff does the other player see the changes or do u need a script to do so?

  • @curranh.8328
    @curranh.8328 3 роки тому +2

    Oh my god, you must be related to Benedict Cumberbatch...!

  • @MickeyGMusic
    @MickeyGMusic 3 роки тому +2

    I've been following your tutorials, but when i add movement to this VR tutorial (the continious movement script) it moves super fast!! Not sure why it happens, i can't edit the speed.. because if i change the value nothing happens i keep on running fast wich makes the game impossible to play (the teleport works perfectly, it's just the walking)

    • @MickeyGMusic
      @MickeyGMusic 3 роки тому +1

      Other then that, awesome tutorials man!! keep them coming love it!

    • @MickeyGMusic
      @MickeyGMusic 3 роки тому +1

      PS this fast walking ONLY happens when connected trough a network.. if i don't connect, i walk at normal speed like in the tutorial.. but when connected to a multiplayer room i run like crazy! hope you know a fix :D (might be dang easy,, but yeah i can't find out)

    • @AlphM
      @AlphM 3 роки тому

      @@MickeyGMusic I know im a month late but did you add any collisions to the xr rig? If so your Network player was probably colliding with the xr rig, just change their collisions in the physics tab in the project settings

    • @Bricksalive
      @Bricksalive 2 роки тому

      @@AlphM didn't work for me? Any other way to fix this?

  • @OneTime_12
    @OneTime_12 3 роки тому +2

    Awesome multiplayer series, part 4 is even better. Quick question, is photon 20 players total or 20 players per room that you create?

  • @RecRoomFocused
    @RecRoomFocused 8 місяців тому

    18:06 , just saving this because I need to return to this point later

  • @Mad_Luv85
    @Mad_Luv85 3 роки тому

    amazing

  • @crecker1850
    @crecker1850 Рік тому

    how would i make it to where it generates a code and the user can click join public and it would be a public lobby that other people are in

  • @djcrytec7177
    @djcrytec7177 4 роки тому

    Great work!!!! PLS moooooore! ;-)

  • @manic3911
    @manic3911 2 роки тому

    Hey how do I make it to where when I load up the game and connect then I join a random lobby with at least 1 other person or create a new one not just 3 rooms

  • @imlogvn
    @imlogvn 2 роки тому

    can u make more videos on this subject like character models?

  • @dxxns8108
    @dxxns8108 2 роки тому

    @Valem the voice isnt loud enough any help please!!! (btw im a new person to unity)

  • @JackLewisPhD
    @JackLewisPhD 2 роки тому +1

    Great to finally see the face behind the voice of wisdom! Keep up the good work, mon brave. You are very kind to spend so much time being the guiding light that sees us safely through the valley of dev darkness! Multiplayer embodies everything that is truly great about VR gaming so well done you for focusing on this important topic...

  • @RealisticNoob
    @RealisticNoob 4 роки тому +1

    camera = yes
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    got ya

  • @Imperial_Dynamics
    @Imperial_Dynamics 3 роки тому

    you forgot to set the near clip plane of the new camera to 0.01

  • @julienphilippe2112
    @julienphilippe2112 3 роки тому

    Hi Valem !
    Nice Tuto, thank you very much !
    but I have a problem with your lobby system : all players of the same room are not master !!!
    It seemes that once room created, it never delete.
    EDIT : I found my problem the PhotonNetwork.LoadLevel change scene before Networkmanager has finished to works

  • @wtfimcrying
    @wtfimcrying 4 роки тому +2

    ur actually saving my life.

  • @subhroneelbhattacharya321
    @subhroneelbhattacharya321 Рік тому

    HOw do I make characters visible with animations with photon and VR?

  • @vegitoblue2187
    @vegitoblue2187 2 роки тому

    any tips on how I can reduce lag on the pickups. (I am doing my setup in photon ue4)

  • @simongodspeed
    @simongodspeed Рік тому

    how can I do if i want invite someone in it?

  • @mario123mario123
    @mario123mario123 3 роки тому

    Wow :D a Wild Valem appeared. :D Didn't expect this one, :P I like your French accent :P Tnx for the Multiplayer tutorial :) I will need it during my internship :] Epic!!

  • @mesmes9424
    @mesmes9424 2 роки тому

    Hi !, Just wonder... How can we set up the client height after / before connecting to the server ?
    We can't set the Network Player Head position because it continuously getting updated...

  • @kevinbayr2061
    @kevinbayr2061 4 роки тому +1

    Can you Pleas make a Tutorial How to Shot and kill in Multiplayer thanks.

    •  4 роки тому +1

      My way works but I’m sure if Valem did a video on it I’m sure he could make a better way!

  • @jasonmckay2769
    @jasonmckay2769 2 роки тому

    If you are getting an error when selecting the room to enter (scene not in the build settings -add it) then here is my fix. In the "InitializeRoom" method (in the NetworkManager) I injected the defaultRoomIndex right into the PhotonNetwork.LoadLevel(defaultRoomIndex). Just ensure that you have the proper index for the scene in your room button canvas.

  • @alexandergonzalez3376
    @alexandergonzalez3376 3 роки тому

    the best

  • @ecykal35
    @ecykal35 3 роки тому +1

    I tried adding your continuous movement script from your previous series but when I joined through the lobby it made me teleport backwards when I moved the joystick. How do I fix it?

    • @ecykal35
      @ecykal35 3 роки тому +1

      actually dont worry i found a fix further down in the comments

    • @alwiras99
      @alwiras99 2 роки тому

      @@ecykal35 how to fix that :'' I already tried but didn't work

  • @donaldduck5818
    @donaldduck5818 3 роки тому

    Please help, I have one quest 2 headset. Is it possible to make a multiplayer game with it? How would I test it?

  • @YT-ql7me
    @YT-ql7me 2 роки тому

    Where is part 4?

  • @bricktube3871
    @bricktube3871 3 роки тому

    Does this multiplayer series work on Quest? Without link?

  • @ItzRyanF00
    @ItzRyanF00 4 роки тому +1

    Can you make a tutorial for making a full body?

    • @OneTime_12
      @OneTime_12 3 роки тому

      He has a three part video series starting here, ua-cam.com/video/tBYl-aSxUe0/v-deo.html. I have gone though it and it should help you out.

  • @BluUserName
    @BluUserName 4 роки тому

    could you teach how to make roblox vr games? i've been trying to make a vr game on roblox for 6 months could you help? if you cant is fine

  • @fressno1807
    @fressno1807 4 роки тому

    Valem, is there a way to make an objects collision work when you have grabbed it? like how do you make a sword grabbed by the played, collide with an object? i cant get the sword to collide unless i drop the sword. do you know this problem?

  • @abhineshprabhakaran6423
    @abhineshprabhakaran6423 3 роки тому

    How can you synchronise material change over network

  • @jokexy
    @jokexy 4 роки тому

    It’s been awhile since I’ve watched but I recently got back into my quest and wanted to check to see if you were still uploading. So glad to see you still are! Please keep going strong as I’m gonna binge what I missed in quarantine bro!

  • @ttttkk2
    @ttttkk2 3 роки тому

    hi, great tutorials, I still want to know how to set the spawn position for each player? They now all spawn at the same spot (0.0.0)

  • @JacksBestGaming
    @JacksBestGaming 3 роки тому

    make a part 4 where you customize your character in multiplayer

  • @spimonkey34
    @spimonkey34 2 роки тому

    I have a Question, how do you make a name system

  • @ayodejisasegbon2063
    @ayodejisasegbon2063 3 роки тому

    strange he looks exactly like I thought he would

  • @TayoEXE
    @TayoEXE 4 роки тому

    You are the only person I've subscribed to Patreon for. Ever. That should tell you how valuable your tutorials and help is. Keep up the great work!

    • @ValemVR
      @ValemVR  4 роки тому

      Oh thank you so much for the support Tayo it means a lot ❤️

  • @gamecubegarrett6416
    @gamecubegarrett6416 3 роки тому

    It would be really cool if you could show how to make the Gravity Gloves from HL:A :D

  • @kingfhd2424
    @kingfhd2424 4 роки тому

    Is your vr tutorial for the basics is done

  • @coreyduncan3427
    @coreyduncan3427 3 роки тому +1

    Are anyone else's VR Rigs from the VR basics with the continuous movement script suddenly moving way faster than they would prior to adding photon? This only seems to happen when I use the Lobby button to load the next scene aka room 1, room 2, etc...

    • @Rixium
      @Rixium 3 роки тому

      This seems to be a problem with the CapsuleFollowHeadset() method. If you remove that, does it work for you?

    • @coreyduncan3427
      @coreyduncan3427 3 роки тому +4

      @@Rixium ahh sorry I did fix it. I made a new layer for the network player and made it ignore my playerbodylayer since they were colliding and bouncing around as far as I could tell.

    • @Rixium
      @Rixium 3 роки тому +1

      @@coreyduncan3427 Thanks for that! I was having trouble fixing it. I just ended up moving the charactercontroller and the player controller to the Camera Offset, and it also worked too.

    • @samuelmontambault4518
      @samuelmontambault4518 3 роки тому +1

      @@coreyduncan3427 Hi! omg you save me I have the same issue! Can I have a little more information on how you manage to ignore a layer? Thanks!

    • @ecykal35
      @ecykal35 3 роки тому +1

      Thank you so much

  • @mesopable
    @mesopable 3 роки тому

    Fantastic theme. Multiplayer has so much potential in VR.

  • @elijahstanton1961
    @elijahstanton1961 4 роки тому

    pls donated me REBEX

  • @vrtools
    @vrtools 4 роки тому

    great part 3! thx Valem for awesome video!

  • @egonvanpraet
    @egonvanpraet 4 роки тому

    Bro you are amazing! Keep up the work

  • @jacobcrane919
    @jacobcrane919 3 роки тому

    Movement next please

  • @St.RomanJr
    @St.RomanJr 2 роки тому

    HOW
    HOW

  • @sharshur3150
    @sharshur3150 4 роки тому

    You are gonna be huge. Keep up the good work! :)

  • @TheOfficial_Dev
    @TheOfficial_Dev 3 роки тому

    If anyone is watching recently can you help me with the UI it wont work

    • @LeonInfinity
      @LeonInfinity 3 роки тому

      What you need to do is, instead of: "roomUI.SetActive(true);" make it: "roomUI.SetActiveRecursively(true);"

  • @elaih1744
    @elaih1744 4 роки тому

    s
    omething

  • @caicrucial4422
    @caicrucial4422 4 роки тому

    Love the upgrade of the camera! Nice to see you again. Keep up the good work!

    • @ValemVR
      @ValemVR  4 роки тому +1

      Hi Cai, happy to see you here thank you for the comment !

  • @xX_BeamCRASH_Xx
    @xX_BeamCRASH_Xx 3 роки тому

    Hi,
    I have a question - I would really like to have a nickname system in my game. Would you like to make a tutorial about that?

  • @drbladdy786
    @drbladdy786 4 роки тому

    Jes

  • @sin3017
    @sin3017 4 роки тому

    Second

    • @sin3017
      @sin3017 4 роки тому

      Thank you for your great help~

  • @henrybishop3389
    @henrybishop3389 4 роки тому

    THIRD

    •  4 роки тому

      Actually I’m third

  • @charlottegilkinet460
    @charlottegilkinet460 4 роки тому

    Hii awesone :) Are you single ?