0 votes

I have a light2d element which sits over the scene and is implemented as timer goes off. Now the UI buttons and pause button also hides behind the light 2D mask i made. How can i bring it in front. The texture buttons dont have a Z axis. Light2D does n i put it as back as possible (Z = -10). Still the buttons are hidden in back. How can i bring it in front? any ideas? Thanks

in Engine by (73 points)

1 Answer

0 votes

If I am not wrong, you can put your UI nodes in a CanvasLayer. This way, they should not be affected by the Light2D.

by (225 points)

The UI nodes are under a canvas layer. Still doesnt show

Maybe you can try disabling all light masks the texture buttons have? As far as I know light masks are used to check if the tagged layer has a light.

You have to play with "Z min" and "Z max" parameters in the Light2D node. Depending on these values, only nodes that lie in the Z range will be affected.

Another solution is to use a different Item mask for Objects and GUIs.

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 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 webmaster@godotengine.org with your username.