Hello! I am trying to do a multiplayer kart game similar to Mario Kart, but when i was doing the network scripts for the camera i had a problem.
I want to have the camera to only follow the local player, like im playing in the editor and my camera only follows me while the camera on the build only follows the player in the build.
But the camera CAN’T have any parent relation with the player, cause if it do it will have the same rotation and it looks janky.
I tried instantiating the camera as the player connects to the network, but it creates 2 cameras but they don’t know which player to follow.
WHAT I AM TRYING TO DO
The only way i got it working was making the camera a parent of the player, because it can get the transform of the player it is attached to, not EVERY player in the scene.
I need a way to make that camera child not follow the same rotation as the parent (player), because it script already have a specific type of camera follow that looks fine to me.
OR
Have a way to instantiate the cameras apart from the player so they are not their child but still have to get the transform of their respective local players. Example ( Player 1 connects and instantiates a camera, so this camera gets this players script and transform that instantiated it, the same thing for the Player 2)