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 - Развлечения
one of the best tutorials around. would be nice if you made one with unity netcode
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.
}
I have been having this problem for days! thank you so much!@@karmaa1036
thx for the tutorial. congrats for your new job :)
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.
Nice tutorial keep it up!
Great tutorial, thank you :)
thanks, you made it very simple 😃
Nice job
thanks!!
Cool😊
Finally
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?).
Nice tutorial, but you forgot to add this and the next tutorial to your steam multiplayer playlist :)
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
thanks babe as always
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
nice tutorial now though can you put that you can move the view? thanks
Could you explain what you mean ?
@@ZygerGFX that you can turn and move the visual
Does this use Untiy Network Gameobjects alongside Mirror?
no its mirror and steamworks
Everything works except that the client cant see the host player. The host player can however see the client player
Is there a reason you assign the position every frame even though the camera is a child object of the player?
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
@@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
@@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.
@@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?
@@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.
Can you do another version with cinemachine?
It's basiccaly the same, we just affect the camera holder
Or just get if not local player then deactivate camera
Yeah its the same thing just the opposite way around. But also can be used :))