Closed davcri closed 3 years ago
func reparent_node(node: Node2D, new_parent, update_transform = true): var previous_xform = node.global_transform node.get_parent().remove_child(node) new_parent.add_child(node) node.global_transform = previous_xform
This is not implemented in Godot because it's easy to do with GDScript. However it seems like a handy feature to have in a game template (and also to avoid duplicating code).
Relevant Godot issues:
This is not implemented in Godot because it's easy to do with GDScript.
However it seems like a handy feature to have in a game template (and also to avoid duplicating code).
Relevant Godot issues: