Hi, I am using Godot Engine for a uni assignment.
In an Area
, which has the area_enter
signal connected, I try to queue_free()
any node after a collision with my Area
.
However, an error "Condition !isinsidetree() is true " shows up in the debugger after each node collision with my Area.
The sample code is as below :
func my_area_on_area_enter(area):
# check if the parent of the area (the node) is inside tree
print("Area in tree : ", area.get_parent().is_inside_tree())
# delete the node (which has an extra area for collision purpose)
area.get_parent().queue_free()
The Output terminal shows that for each node colliding with my Area, all of them are inside the scene tree but the error of "Condition !isinsidetree() is true " still appears nevertheless.
I have been googling and checked from godot github repo but I found no solution.
I appreciate greatly if anyone shares possible solution.
The godot version I am using is v2.1.3
Thanks !