+2 votes

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

in Engine by (32 points)

3 Answers

+3 votes

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.

by (10,491 points)
0 votes

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.

by (244 points)
0 votes

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.

by (20 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.