Mouse Filters Set to Pass - Control still blocking mouse input

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

Hi All,

I’m having an issue where I have set all of the mouse filters for all of my controls to “Pass”, but some of them are still blocking mouse input from reaching other controls. Specifically in the scene tree posted below, WarMessageBox is blocking InventoryUIManager from getting mouse input. InventoryUIManager has mouse_entered signals that fire when WarMessageBox is not there, but stop firing when I add it back in. I have set the mouse filter for WarMessageBox to pass along with its grid and background. Is there something else I am missing here?

Scene Tree

:bust_in_silhouette: Reply From: tuon

I have duplicated your scene as much as possible with the given information and had the same issue. (The script I attached to InventoryUIManager did not have it’s mouse_enter signal triggered.) When I set the mouse filter for WarMessageBox and it’s children to Ignore, it worked. Try doing the same to see if that helps. If not, we’ll need more information about the scene setup to make more suggestions.

:bust_in_silhouette: Reply From: njamster

Input events will only be passed upwards in the node hierarchy, so they will be handed to CanvasLayer, UIManager and InventoryTest but won’t reach any of their children. If you want that, you’ve to code that yourself.

:bust_in_silhouette: Reply From: ChildLearning.Club

There seems to be a lot of discussion about this on GitHub, and I for one was just as confused in understanding what each of the filters does. From what I can tell the “pass” filter, as @njamster says, passes up to the parent. I would think having it labeled “pass to parent” would fit well. From one of the GitHub comments it seems that settings all parents and their children to Ignore on the nodes that are potentially blocking will at least get your mouse clicks registering, from there you can adjust. Not sure if this is the best advice, but it 's what worked for me and at least got me moving forward.