Unity Individual Cameras - Steam Multiplayer Game in Unity

Поделиться
HTML-код
  • Опубликовано: 6 июн 2024
  • In this video I will be showing you how to implement individual player cameras. I will go over how to get the initial camera system working. And also how to get it synced across the network.
    Source Code: www.patreon.com/posts/6988323...
    -----Tutorial Links-----
    Previous Video: • Unity Individual Camer...
    Steam Docs: partner.steamgames.com/doc/home
    -----My Personal Links-----
    Discord: / discord
    Instagram: / gabzxd
    Twitch: / officialzyger
    Twitter: / zygerdesigns
    ➤WISHLIST MY GAME:
    store.steampowered.com/app/16...
    ----Time Stamps-----
    0:00 - Intro
    0:08 - Unity Setup
    0:33 - Camera Script
    3:19 - Final Unity Changes
    3:37 - Final Result
  • РазвлеченияРазвлечения

Комментарии • 36

  • @Asky_
    @Asky_ Год назад +19

    one of the best tutorials around. would be nice if you made one with unity netcode

    • @karmaa1036
      @karmaa1036 10 месяцев назад +4

      Modify the "OnStartAuthority" method to the following
      public override void OnNetworkSpawn() { // This is basically a Start method
      cameraHolder.SetActive(IsOwner);
      base.OnNetworkSpawn(); // Not sure if this is needed though, but good to have it.
      }

    • @imchase8600
      @imchase8600 3 месяца назад

      I have been having this problem for days! thank you so much!@@karmaa1036

  • @melihkorkmaz6106
    @melihkorkmaz6106 Год назад +1

    thx for the tutorial. congrats for your new job :)

  • @kyroic6128
    @kyroic6128 Год назад

    thanksss, i ve been having this issue for a long time and couldnt find solution anywhere. I adjusted your way for photon network and it worked.

  • @bananastudiotheprogramer
    @bananastudiotheprogramer Год назад +1

    Nice tutorial keep it up!

  • @GabrielFerreira-ot8cg
    @GabrielFerreira-ot8cg Год назад +1

    Great tutorial, thank you :)

  • @ee500ee
    @ee500ee Год назад

    thanks, you made it very simple 😃

  • @nunya_bysnes0014
    @nunya_bysnes0014 Год назад

    Nice job

  • @studio_gimbap
    @studio_gimbap 6 месяцев назад

    thanks!!

  • @davidherzog6023
    @davidherzog6023 Год назад +1

    Cool😊

  • @sggsgsggsrr
    @sggsgsggsrr Год назад

    Finally

  • @Crandor
    @Crandor Месяц назад

    Nice tutorial :)
    I'm still wondering how to make the camera's rotation work, so like make the player move in the direction the camera is facing at (transform.right?).

  • @aimojorma7674
    @aimojorma7674 7 месяцев назад

    Nice tutorial, but you forgot to add this and the next tutorial to your steam multiplayer playlist :)

  • @phatlienminh8928
    @phatlienminh8928 3 месяца назад

    if i have 2 player, camera in scene have 3 (main, cam_player1, cam_player2) it make view of each player can't move anymore. What should i do, if just 1 player it run perfectly

  • @coolorphans
    @coolorphans Год назад

    thanks babe as always

  • @TNCGamer
    @TNCGamer 8 месяцев назад

    it works but when another person joins the game my camera rotation doesn't turn with the player anymore..and when he leaves it starts working again

  • @ggng_leo6227
    @ggng_leo6227 Год назад +1

    nice tutorial now though can you put that you can move the view? thanks

    • @ZygerGFX
      @ZygerGFX  Год назад

      Could you explain what you mean ?

    • @ggng_leo6227
      @ggng_leo6227 Год назад

      ​@@ZygerGFX that you can turn and move the visual

  • @emptybruh
    @emptybruh Год назад

    Does this use Untiy Network Gameobjects alongside Mirror?

    • @ZygerGFX
      @ZygerGFX  Год назад

      no its mirror and steamworks

  • @ViggeGee
    @ViggeGee 6 месяцев назад

    Everything works except that the client cant see the host player. The host player can however see the client player

  • @halo123proplem
    @halo123proplem Год назад

    Is there a reason you assign the position every frame even though the camera is a child object of the player?

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      Because the position isn't exactly the parent position there is an offset that gets added so we need to update it. Also if your wanting the camera to lerp you'd need to do this

    • @halo123proplem
      @halo123proplem Год назад

      @@ZygerGFX that's logical, so you could also just assign the offset to the local position of the cameraholder.
      but does the cameracontroller have to be on the playerobject? It seems counter intuitive to have all the components on the same object

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      @@halo123proplem No it doesn't have to. in fact in my own little project it isn't. I made it on the same object here for simplicity's sake. If I had it not be parented then there would be a little more work to do, and since a lot of beginner people follow these tutorials I opted to not go that route. By all means if you are seriously trying to make a game that you're planning on releasing then I would recommend using a different system since I agree with what you said of it being counter intuitive, but most people don't which is why I did it that way in this tutorial.

    • @halo123proplem
      @halo123proplem Год назад

      ​@@ZygerGFX Thank you for the clarification and thank you for these tutorials. I would love to see a network tutorial for how the players interact with objects in the scene, f.x picking up a box or kicking a box.
      do you have anything like that planned?

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      @@halo123proplem I haven't got anything planned like that though its a good idea. I will probably at some point do something similar though don't know how long it will be till then.

  • @birdboy4774
    @birdboy4774 Год назад

    Can you do another version with cinemachine?

    • @SantaGamerYoutube
      @SantaGamerYoutube Год назад

      It's basiccaly the same, we just affect the camera holder

  • @samuelhedrick356
    @samuelhedrick356 Год назад +1

    Or just get if not local player then deactivate camera

    • @ZygerGFX
      @ZygerGFX  Год назад

      Yeah its the same thing just the opposite way around. But also can be used :))