0 votes

Okay, so I'm making a HUD for my game, which controls a lot like a PC RTS (right click on map to move unit, etc) and so the map shouldn't receive mouse events "under" the UI. That's simple enough with mouse filtering, alright.

Thing is, my HUD has this shape where you can see the map through a "cut" in the inner border (pictured below), but Godot seemingly only assumes the total area of my HUD's texture to be it's collision area and will either filter nothing at all, or block clicks done on the map through this cut.

The HUD's bottom panel, with a "cut' on the middle top part

Is there some way of defining the shape of a Control node's filter area? So far the only idea that comes to mind would be making a polygon 2D collider that follows the camera, and that seems way too hacky...

Godot version 3.1.1
in Engine by (72 points)

from what I know, buttons only possess the capability of the things you say.
So you need to change the type of your control node into a button. and once you do that, you'll just create a click mask of it.
This also adds a new effects like dynamic HUD etc. but if you want to just be plain, make sure that 'pressed' 'hover' 'disabled' 'normal' is the same texture.

I don't think this is possible, but you can suggest it on the proposals GitHub.

Please log in or register to answer this question.

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.