#Godot 4 multiplayer sync problem with host

2 messages · Page 1 of 1 (latest)

warped raptor
#

I been following 2 Godot 4 multiplayer tutorials but they are both for 3D so I have been trying to convert their into 2D but im stuck on this one part. When the host joins everything but when the client joins he does not see the host but the host can see the client and his movements. My only guess being new to this is the the MultiplayerSynchronizer is missing something in the replication tab or from the errors it might be something with the MultiplayerSpawner and not creating the host correctly or something correctly. If I have 3 games running both clients work perfect with each other its just the problem with the host seeing them move around.

#

player script```extends CharacterBody2D

@onready var camera = $Camera2D

const SPEED = 100

func _enter_tree():
set_multiplayer_authority(str(name).to_int())

func _ready():
if not is_multiplayer_authority(): return

camera.make_current()

func _physics_process(_delta):
if not is_multiplayer_authority(): return

var input_dir = Input.get_vector("left", "right", "up", "down")

velocity = input_dir * SPEED

move_and_slide()```