My node can shoot bullets, which are added to it as children. When the node dies I do not want all its bullets to die. I have a function that calls
add_child on all the bullets, removing them from the parent and adding them to
'/root'. Something like this:
remove_all_bullets_and_add_to_world() #works fine according to remote inspector
queue_free() #still deletes the bullets!
I have seen that this works in the remote inspector, a breakpoint after doing this shows the bullet nodes are on the root object. However, calling queue_free afterwards still deletes all the bullets as if they were still children. They are removed from the screen and from the remote inspector (so they're not just being repositioned). Any ideas why this might be?