Skip to content

RemoteTransform2D

Inherits: Entity2D < CanvasItem < Entity < Object

RemoteTransform2D pushes its own Transform2D to another Entity2D derived node in the scene.

RemoteTransform2D pushes its own Transform2D to another Entity2D derived node (called the remote node) in the scene.

It can be set to update another node’s position, rotation and/or scale. It can use either global or local coordinates.

Type Name Default
EntityPath remote_path EntityPath("")
bool update_position true
bool update_rotation true
bool update_scale true
bool use_global_coordinates true
Returns Method
void force_update_cache()

remote_path

EntityPath remote_path = EntityPath("")

The EntityPath to the remote node, relative to the RemoteTransform2D’s position in the scene.

update_position

bool update_position = true

If true, the remote node’s position is updated.

update_rotation

bool update_rotation = true

If true, the remote node’s rotation is updated.

update_scale

bool update_scale = true

If true, the remote node’s scale is updated.

use_global_coordinates

bool use_global_coordinates = true

If true, global coordinates are used. If false, local coordinates are used.

force_update_cache

void force_update_cache()

RemoteTransform2D caches the remote node. It may not notice if the remote node disappears; force_update_cache() forces it to update the cache again.