Using MultiplayerSynchronizer with nodes being dynamically reparented

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sygi

I have a player, that picks up items. Items are in a global supply (/root/world/objects) until they are picked up, at which point they are reparented to the player. When the player drops the item, it is being reparented back to the global supply (with the position updated to account for the ownership change).

Now, I would like to add multiple players. While the players are synchronized on their own, I also want to synchronize the items, to avoid physics inaccuracy. However, when I attach an MultiplayerSynchronizer under the object, it seems to search only for the node that’s under the original path:

E 0:00:06:0310   get_node: Node not found: "root/world/objects/luggage/MultiplayerSynchronizer" (relative to "/root").

What’s an expected solution? Should I dynamically be changing the replication config to account for the ownership change?

Did you ever figure this out? I’m trying to do the same thing right now and I’ve been pulling my hair out trying to find the answer.

MarkEnnisDev | 2023-04-20 04:34

I got this into a state where the error only happens for one frame (this is the code I used), so technically yes. However, overall it does seem to me that the whole multiplayer tech for Godot 4 is not yet ready to be used, eg. see this and that bugs.

sygi | 2023-04-20 09:21