Godot Version
4.4.1
Question
Hi everyone,
Is it possible to do this directly in the engine? Like in this Unity tutorial:
4.4.1
Hi everyone,
Is it possible to do this directly in the engine? Like in this Unity tutorial:
Yes, it’s possible (as long as the OS windowing compositor is capable of) You’ll need to enable the following project settings:
Display/Window/BorderlessDisplay/Window/TransparentDisplay/Window/Per Pixel TransparencyRendering/Viewport/Transparent BackgroundYou’ll need to enable Advanced Settings to be able to see some of those properties.
i have big problem with mouse_passthrough
saw few videos but didn’t manage understand how did it work .
and according to comments it doesn’t work on different drivers
like this one;
As explained in the documentation you need to enable Window.mouse_passthrough and set the Window.mouse_passthrough_polygon to specify the polygon where the mouse events will be intercepted by the app and won’t be pass through. Also, as explained in the documentation:
Note: On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
look at the comments in her itch io and yt , you will see many compline its not working as expected
After you set all the transparent project setting to true, you need to setup the viewport in code.
here is my code to make the window transparent:
func transparentize_window():
var _rid = get_tree().get_root().get_viewport_rid()
RenderingServer.viewport_set_transparent_background(_rid, true)
DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_TRANSPARENT,true)
Run the method in _ready()