HomeGuides
HomeGuidesLearn about the Immerse SDK installerLog In

Transform Sync

📘

This feature requires the Immerse SDK Enterprise Edition

This is different to the free Immerse SDK. Contact [email protected] if you require access.

Understand the difference between the Free and Enterprise SDK

As its name suggests, the TransformSync component is used for synchronising Transforms in an Immerse Session, so that all connected users see objects and other users located in the same place (and orientated in the same direction).

Authority

Transform Syncs work by allowing one client to send the current state of an object, which is then reflected in the views of other users. The user sending these messages is known as the authoritative user.

Taking Authority

It is important to take authority of a Transform Sync when you want the local user to control it (e.g. when they pick up an object). Having the object locally simulated, while the user interacts with it, provides a much better experience as there is no latency.

Authority can be taken by calling TakeAuthority on the Transform Sync component. This method can be also be called using events, making it easy to integrate with existing VR interaction libraries.

Code Reference

Properties

PropertyDescription
IdThe unique ID for the TransformSync. This is generated by the Scene component in which it is indexed.
OwnerCurrent owner of the TransformSync component.
HasAuthorityReturns true if the local user has authority for the TransformSync.
UpdateIntervalThe interval in which update messages should be sent.
RigidbodyReturns the attached Rigidbody component if one is present.
SyncPropertiesAn enum flag that specifies which properties should be synchronized.
DefaultIsKinematicDefault kinematic status for the attached Rigidbody (if present).

Methods

MethodDescription
TakeAuthorityCall this method for the local user to take authority for the TransformSync.
SendUpdateThis can be used to send an update immediately. This method takes an optional takeAuthority parameter that, when true, will take authority of the TransformSync if the local user does not have it.

If this method is called and the local user does not have authority and takeAuthority is set to false, no update will be sent.
PropertyIsSyncedReturns true if the provided property is to be synced by the TransformSync.