Networking Unity's Third Person Character Controller - Mirror

Поділитися
Вставка
  • Опубліковано 13 вер 2024

КОМЕНТАРІ • 77

  • @danascully7667
    @danascully7667 2 роки тому +2

    I google what I did wrong for 3 days and now I find this awesome tutorial. Thank you, u saved my time

  • @syntaxless
    @syntaxless 2 роки тому +5

    as others have said, this was straight and to the point.
    I was very close with my implementation but starting with input disabled and enabling on client authority was the last piece I was missing.
    thanks! I am subbing to the channel :)

  • @kikaru221
    @kikaru221 2 роки тому +9

    To sync animations, I had to disable and re-enable the Character Controller and Third Person Controller like Player Input
    Overall, good tutorial

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

      Thank you so much, I was lost for a day why I was sliding around lol

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

    you honestly couldn't have possibly done anything to make any of this better. thanks!

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

    This was straight, to the point, and helpful. Thanks a lot.

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

    Love you guy. You saved my day. I got stuck on how to move local player by keyboard/mouse. Wow just untick Player Input. I forgot it. Thanks again.

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

    Gosh to the point without the waffle, you helped me a great deal.

  • @CodeBreakerSI
    @CodeBreakerSI 4 місяці тому

    Thank you for the basics!

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

    Woow this was straight to the point you covered so much in just 7 minutes this deserves a like and a subscribe 💪

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

    Just what I needed thank you!

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

    Perfect video and explanation. Thanks.

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

    Well done man, thank you very much for the information

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

    Hey that actually helped! Thank you!
    I'm not using Mirror, so for the Player Input issue using UnityNetcode, you can override the "OnNetworkSpawn" method and works the same :)

  • @StarCourtesan
    @StarCourtesan 2 роки тому +5

    Short and to the point - would you perhaps explore networking physics in the future?

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

    The best one out there my friend! 😍 ez and fast

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

    Another great video. A video on updating player positions, server side (when not using Client Authority, would be great. When playing as a client (Unity + Mirror based game) and I add a projectile it adds it at where the player was originally created and not where they appear on the screen. I'm sure this is because the server thinks the player is still in it's originally position even though all clients see the player has moved

  • @SD-xt4rp
    @SD-xt4rp 2 роки тому

    Really really helpful! Definitely worth a like and a subscribe!

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

    Really Thanks a lot, this really solve my problem and very quickly. Very GOOOOOOOOD work. Thanks.

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

      BTW,I really wonder how you fix those problem in mirror with startAsssets.I can found the problem is something on Camera and Input.Then I found this need to mix the StartAsssets And Mirror in both Script.I just can got there. Because i thought then need read all code in StartAsssets And Miiror. I feel bad. And so a lot work need to do.Did you do that? Or some suggestion.Maybe more Background content how will you do will be more help.That can let me Understand how to fix problem when situation like this.
      In all way , respect and truely thanks.

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

      BTW,I really wonder how you fix those problem in mirror with startAsssets.I can found the problem is something on Camera and Input.Then I found this need to mix the StartAsssets And Mirror in both Script.I just can got there. Because i thought then need read all code in StartAsssets And Miiror. I feel bad. And so a lot work need to do.Did you do that? Or some suggestion.Maybe more Background content how will you do will be more help.That can let me Understand how to fix problem when situation like this.
      In all way , respect and truely thanks.

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

    You did a great job buddy thanks

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

    Thanks so much for this tutorial.

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

    Hi, I found your video very good.
    Do you think I could adapt it to VR?

  • @SadBoyXD
    @SadBoyXD 9 місяців тому

    Hi sir, I'm still a beginner, can you include a mobile joystick for this project, I'm really struggling😢

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

    Nice Video

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

    Please make a series on Server Authority every person using mirror is dying for it and i think u can get a tons of views on that series

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

      Ah, Server Authority is definitely a slightly bigger challenge. Not because the movement will desync, but there is no built in CSP (Client Side Prediction).
      IIRC, Unreal's replication system ships with Server Authoritative + CSP out of the box :D
      Anyway, I will definitely look into it and see if I can put something together.

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

      @@rohan_mayya Nice hope u will be able to put it together 👍

  • @PloverFN
    @PloverFN 2 місяці тому

    the other charachter in the multiplayer keeps jumping, what did i do wrong?

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

    Great video. Do you think you could make one but use photon pun instead of mirror? Would be great!

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

    can't add Player prefab to network manager

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

    hey thank you so much for this tutoriel can you do another one where you explain how to add an aws server on your multiplayer

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

    wow thats looking really good, can i do the same with the First Person Character Controller?
    And its working with fishnet?

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

    why after following your guide to the letter I get two players, one of which moves and the other does not? I removed the checkbox on playerinput as you did but in this way both players don't move the strange thing is that it compiles everything correctly

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

      Did you assign the player input in the script attached to your player? That's a required step

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

    Why in the mobile version using the mirror the character does not move correctly according to the joystick? Thanks!

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

    just player in the server side works fine, client is freez! :/

  • @teledevgames
    @teledevgames 11 днів тому

    Hey, I tried to port this to first person, but for some reason the camera is left at the MainCamera position, and doesn't go to follow the player. Do you have any clue why this could happen?

    • @teledevgames
      @teledevgames 11 днів тому

      FYI, this only happens when running it via Steam, otherwise it works perfectly (with LAN networkmanager)

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

    why it never turns out like in the video? (
    a bunch of incomprehensible errors, I'm looking for a solution to these problems for a very long time.
    rewatched the vid 10 times and did the same thing

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

    Does anyone know why that is the case? When one character stay and the other moves then it works correctly, but when both characters are moving, they pass each other.

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

    I couldn't get this to work with playfab multiplayer servers. Is there a way where i can sync player movement while connected to a multiplayer server. my player has networktransform(with authority) and identity. also a movement script with the new input system. ı can sync movement on localhost but not on playfab server session

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

    players position is not synched for me how can i solve?

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

    please how to do it mobile

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

    interesting

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

    mobile joystick not working with mirror. can you help please

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

      You'll have to use a Joystick pack or configure your own, and handle movement with the output the joystick gives you.
      There's a good free one on the Asset store

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

    Hello rohan, is this possible to make it multiplayer with Unitywebgl + Mirror ?

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

      Hahaha ironically I'm working on doing this for a game in production right now and I'm having issues with Playfab hosting for it. Let's see how far I can get xD

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

      But to answer your question, yes, you can use mirror to build a mp game for webgl

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

      @@rohan_mayya if you find a way how to do it pls contact me i am lost and i have deadline soon i will pay you

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

    I did everything the same but my character doesn't move

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

      .Assets\Scripts\PlayerMovement.cs(113,43): error CS0118: 'playerInput' is a variable but is used like a type

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

      @@revin8197 could you post your code on something like hatebin so I can look at it?

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

      @@rohan_mayya I managed to solve it had to change there in the player settings to bolth

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

    idolo

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

    please do the same with the mobile prifab .. I would be very grateful! thanks

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

      I'll look into doing this soon! Thanks for the recommendation

    • @cristian.caride
      @cristian.caride 2 роки тому

      @@rohan_mayya Yes please i really need this tutorial

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

    Multiplayer is working fine but animations arent working fine the walk animation just doesnt get send over the network but all other animations are like jump and so on

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

      That's weird. If your animator + network animator are configured right, you shouldn't be having any issues

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

      @@rohan_mayya yea they are configured like in your video

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

      I have the same issue.

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

      Yeah same issue here too

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

      Hey guys, sorry for the late response. Have a look at this thread to see if it helps:
      discord.com/channels/343440455738064897/895295552898617375

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

    Hey Bro I Need Your Help Can You Pls Help me i am making a multiplayer game and its my first game so i am getting so many problems with multiplayer It would be lot for me if you help me.

  • @Xbszidos
    @Xbszidos 6 місяців тому

    NullReferenceException: Object reference not set to an instance of an object
    StarterAssets.PlayerMovement.Move () (at Assets/Player/PlayerMovement.cs:277)
    StarterAssets.PlayerMovement.Update () (at Assets/Player/PlayerMovement.cs:180)

    Heeelp(((