Immerse SDK
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Multiplayer

The avatar prefab is already pre-configured for multiplayer applications. Avatar synchronization is achieved by transmitting the root position and rotation of the avatar (used for teleporting) and the avatar’s input state. This ensures that both local and remote instances of a user’s avatar are driven by the same data, providing a consistent experience across the network.

Avatar Spawner

To simplify management of avatars in multiplayer apps, the Avatar Spawner component can be added to each scene. This component, when loaded, will instantiate the linked avatar prefab and destroy it when leaving the scene. This ensures that each user only has an avatar in the scene they are currently in.

If an avatar already exists in the scene, it will be destroyed when your multiplayer instance is created. This allows you to include an ‘offline’ avatar in your scene, enabling the user to move around before they are connected to the session.

Avatar spawner component