Clicking on Area2D is triggered , even if there is another element "above it"

Godot Version



hi, clicking on Area2D is triggered (also mouse entered), even if there is another element “above it”
my top element is in CanvasLayer

canvaslayer has no way to block mouse input just because it’s above it, canvas layer is just a layer, you will need to add Control Node as a child, and has that control node with mouse filter set to stop, so your below node, area2d, wont get any input

1 Like

i have
game node → node 2d → area → collider (catch mouse)
game node → another node 2d → canvas layer → control (with mouse stop) → area → collider

that worked or?

no, unfortunately it doesn’t work, the first area is triggered even if the second one is above it and it seems to stop the mouse

did your control node is set to full rect (anchor)?

no, this is a pop-up “window” of information, it is located in the center and can be moved with the mouse

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.