Godot - Get parent node
How to get parent node from child node in Godot GDScript.
Can get parent node using get_parent()
.
vat parent_node = get_parent()
To get grandparent node 2 levels up, chain get_parent()
calls.
If hierarchy above root is specified, returns Object#null.
vat parent_node = get_parent().get_parent()