Camera Tracking Host Player Only

Godot 4.4.1

I have tried to make multiplayer work for my gladiator game.
I followed a tutorial by curtjs on youtube however that didn’t have any insight on how to make a camera work. This is the code from that tutorial:



It was also based on 2d game and player but I figured I could make it work. When I finished the tutorial The camera was only tracking the host. When I fired up two instances the joined player wasn’t seeing through it’s own camera but through the host’s camera.
Could someone help fix this problem?
Thx in advance.

You can check the player characters name against the peers unique multiplayer id and set the player camera current to true on the conditions that they match.

could you show me how to do that? Im still a noob when it comes to networking

if multiplayer.get_unique_id() == name.to_int():
  $NodePath/To/Camera.make_current()

You could probably do this in the _ready() function

I also dont know how your camera is situated in the tree for the character, so you need to replace the path to where the camera is.