Area2D Not Detecting Mouse When Mouse Is Touching Button

Godot Version

4.7.stable

Question

I have an Area2D that detects whether or not the mouse is touching it. It works except when the mouse is also touching either a Button or LineEdit. Now, if I set the mouse filters on the button and LineEdit to ‘Ignore,’ then the area detects the mouse, but obviously the button and LineEdit stop detecting the mouse.

I’ve tried both putting the Area above and below the button in the scene tree, but I’m not sure what to do. Thanks for the help!

Physics picking input events are sent after gui input events so the controls will always capture them first independently of the order of the nodes in the scene tree. Here’s how it works:

What are you trying to do?

It depends what you want to achieve so it’s hard to give you a proper response.

Did you try setting Mouse filter as ‘Pass’ for Button and LineEdit (and make sure it’s set as Pass for any parent node they have and not set as Stop)

Thanks. I forgot to make the parents be ‘Pass’ too.