8. Connected Entities

In this scene...

This scene demonstrates usage of connected Entities.

This scene shares the moving Entities that were in a few previous scenes but also has added functionality.

Right-clicking on a non-local Entity causes the local Entity to start moving towards it while also displaying an arrow pointed at the target. When the Entity reaches this target it will parent itself under it as a child, setting the target as its connected Entity.

From this point onward, until the Entity disconnects by moving or otherwise, the Entity will be smaller and parented to this target. When the target moves the local Entity will move with it as one.

This type of connection can also cause issues. For example if the Client controlling the parent Entity disconnects, destroying its Entity, any Client whose Entity was a child of that destroyed Entity will have its Entity destroyed as well.

To learn more, see Connected Entities.

Build and try

You can build this scene via the Build Settings. Run the local Replication Server through the Window > Coherence > Settings window and see how it works. You can try running multiple Clients rather than just two and see how replication works for each.

Last updated