Hello !
I want to highlight a sprite when the mouse is over it, so my idea is to put the Sprite
into an Area2D
, attach to the Area2D
a CollisonShape2D
and connect the signals mouse_entered
and mouse_exited
to know if I have to highlight the sprite or not.
The issue is, if those nodes are under a ColorRect
(or also under a ReferenceRect
), the mouse_entered
signal is not fired if the mouse enters the CollisonShape2D where it overlaps the ColorRect
/ReferenceRect
.
I don't know if it's possible to prevent that ?
I saw the property "Mouse > Filter" in the ColorRect
's inspector, and if I set it to ignore, the ColorRect
signals about mouse_entered
/mouse_exited
are not fired but it doesn't change anything about the Area2D
:/
I'm still a newbie with Godot, I hope somebody could help me or tell me if I'm doing that wrong. Thanks !