Using the new MultiplayerSynchronizer node
In this recipe, we are going to add the MultiplayerSynchronizer node to the CharacterBody3D scene. We will also add some code to the Character.gd
script so that each player that spawns into a game is unique.
Getting ready
For this recipe, we are going to continue where we left off in the last recipe.
How to do it…
We are going to start in the Character scene and add the MultiplayerSynchronizer node:
- Left-click on the CharacterBody3D node and then left-click the + button in the Scene tab. In the Create New Node window, type
mult
in the Search box and then select MultiplayerSynchronizer to create the node in the scene. Left-click the Create button. - In the bottom Replication panel, left-click on the + Add property to sync... button:
Figure 10.4 – The bottom Replication panel of the MultiplayerSynchronizer node
- In the Pick a node to synchronize window, select CharacterBody3D...