extends CharacterBody3D const SPEED = 10.0 var id = -1 func connect_to_world(id): var world_entity = Global.world.entities[id] world_entity.moving.connect(_on_entity_moving) pass func _on_entity_moving(new_position): var tween = get_tree().create_tween() tween.tween_property(self, "position", new_position, 1/SPEED).set_trans(Tween.TRANS_SINE) pass