Collusion not working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MemokingMH

I have a script that sets a nodes global position = to mouse position and it works fine.
But if I hover it over an area 2d it doesn’t detect it. What can be the problem

:bust_in_silhouette: Reply From: rossunger

If it were a gui Control, I would say most likely culprit is mouse_filter property…
There might be another control above it that’s stealing the mouse move event… you could check the z-index of the area2D.
Also, the collision shape node might be disabled.
Not sure if relevant, but the input/pickable property might be a factor
Also, what event/signal are you using for this? you should probably be using the Area2D’s mouse_entered event for this, or the _input() event if you want more control

Seeing some code would be really helpful. I would debug to see if maybe the event gets called, but the code is not executing the way you imagine.
Also, there’s a debug-draw collision shapes setting somewhere that could help… maybe the area is not where you think it is.