I currently have a ray-cast set up that is working as a hit scan gun and it detects if the fire button is hit and it is colliding and then emits particles on the collision location.
I want to get it so that if it is hitting a certain static body 2d it will emit a signal that will cause the static body to vanish. I have the sending a signal and vanishing part all good but i have no way to tell what the ray-cast is hitting. Currently when anything is hit the static body vanishes. I have seen the func get_collider and am amusing that this is what i need for the ray-cast but don't know how to use this to tell what I am hitting
my plan is if i can get the ray-cast to tell me what node it is hitting i can then do this
if (however i tell what i am hitting) == "node i want to hit"
emit_signal "vanish"
Thanks for any help in advance.