Could it be that the body in the first function is the child of another node? What could fix the problem, in that case, is using the
global_position instead of the normal
It might be necessary to change the
position in your
hurt function to
position is always relative to the parent of that node, while
global_position is the position relative to the root node.