If I have something like an enemy in my scene, and 2 players join the same room, wouldn’t that create 2 separate instances of the enemy for the 2 players? This is a problem because if one player joins a bit later than the other player, the enemy for the player who joined late will still be at it’s origin position and won’t be updated and then you’ll have the enemy be out of sync for the two players. How do I fix this?
You need to make sure only one client in the room instantiates the enemies. E.g. the Master Client can do this. When the current Master Client leaves before doing this, there is a callback that the Master Client switched. Use this as fallback and create the enemies if they are not yet there.
Instantiation is not updated, so all new characters / enemies are placed where you instantiated them. You can add a script to hide them until a first “update” arrived.
1 Like