So my issue is that I have a variable called target
that is a reference to another node. Right now my camera has a script that looks something like this:
_fixed_process(delta):
if(target):
#move to target
This way it moves to any target I set, and if the target is null
it ignores it. But I seem to have a problem when I call queue_free()
inside of a node that is the target. The error I get is:
Attempt to call function 'get_pos' in base 'previously freed instance' on a null instance.
It seems like target
wasn't reset to null
after what it was referencing was deleted.