RemoteTransform2D
Copies a transform to another Entity2D.
RemoteTransform2D copies selected position, rotation and scale values to the entity at RemotePath. An accessory can follow a hand while remaining elsewhere in the hierarchy.
UseGlobalCoordinates = true copies world values; false copies local values relative to each entity's own parent. Disable UpdateScale to retain the accessory scale. This copies transforms; it is not a physics joint.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RemoteTransform2DConstructor
public RemoteTransform2D();Properties5
RemotePathProperty
public EntityPath RemotePath { get; set; }The target Entity2D path relative to the RemoteTransform2D itself. In code use GetPathTo(target). The target must be inside the tree. Do not send transforms back to an ancestor or descendant with a dependent transform.
UpdatePositionProperty
public bool UpdatePosition { get; set; }If true, the remote node's position is updated.
UpdateRotationProperty
public bool UpdateRotation { get; set; }If true, the remote node's rotation is updated.
UpdateScaleProperty
public bool UpdateScale { get; set; }Enables copying scale to the target. Disable for an accessory with its own size. Retaining scale is subject to ordinary floating-point rounding; use approximate comparisons in checks.
UseGlobalCoordinatesProperty
public bool UseGlobalCoordinates { get; set; }When true, copies world values for the selected transform parts. When false, copies local values; source and target may have different parents, so equal local values need not mean equal world positions.
Methods11
ForceUpdateCachevoid
public void ForceUpdateCache();RemoteTransform2D caches the remote node. It may not notice if the remote node disappears; RemoteTransform2D.ForceUpdateCache forces it to update the cache again.
GetRemoteEntityEntityPath
public EntityPath GetRemoteEntity();EntityPathGetUpdatePositionbool
public bool GetUpdatePosition();boolGetUpdateRotationbool
public bool GetUpdateRotation();boolGetUpdateScalebool
public bool GetUpdateScale();boolGetUseGlobalCoordinatesbool
public bool GetUseGlobalCoordinates();boolSetRemoteEntityvoid
public void SetRemoteEntity(EntityPath path);| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
SetUpdatePositionvoid
public void SetUpdatePosition(bool updateRemotePosition);| Name | Type | Default |
|---|---|---|
updateRemotePosition | bool | — |
SetUpdateRotationvoid
public void SetUpdateRotation(bool updateRemoteRotation);| Name | Type | Default |
|---|---|---|
updateRemoteRotation | bool | — |
SetUpdateScalevoid
public void SetUpdateScale(bool updateRemoteScale);| Name | Type | Default |
|---|---|---|
updateRemoteScale | bool | — |
SetUseGlobalCoordinatesvoid
public void SetUseGlobalCoordinates(bool useGlobalCoordinates);| Name | Type | Default |
|---|---|---|
useGlobalCoordinates | bool | — |