Mouse_entered() signal not working

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

And I have no idea why. I’ve set pickable, monitoring, monitorable and everything else to true. I’ve selected all of the collision layers. I’ve set the Z-index to a very high number. I’ve set it back down. I’ve got the collisionshape enabled.

Here’s the code:

func _on_Area2D_mouse_entered():
	print("it works!")

Printing never happens and yes, it does have that little green icon next to it. I’m out of ideas at this point. I’m using Arch btw.

Is there nothing obscuring area ? Like another area or fullrect control node ?

Inces | 2022-05-08 11:04

:bust_in_silhouette: Reply From: DodoIta

You should check if you have a fullrect control node, like @Inces suggested.
If that’s the case, check its mouse_filter property.

Hey. just leaving this for future readers. I tried doing this using an area 2D and collision shape without much success.
What I would suggest is to add a Control Node, and define its rectangle in the wanted area.
Use the mouse_entered() signal directly from the control_node instead of the area2d.

1 Like

Thank you