2D node in 3D environment

Godot Version

Godot 4.2


Can I make a 2D node work in a 3D node environment? The 2D node is similar to a display and I’d like to make a TV that has buttons and can be pressed

I made this “minigame” in a node 2d, and I want to play it in a node 3d, is there a way to do that or I’ll have to remake the node 2d but in 3d.

it’s possible to do it using viewports, can’t remember how to do it exactly tho…
there’s a demo for it in the asset library, but it’s for godot 3.5, but mabe it helps:

1 Like

For Godot 4 there is this Demo project: godot-demo-projects/viewport/gui_in_3d at master · godotengine/godot-demo-projects · GitHub

And a not yet merged improved version: Rewrite Gui in 3D demo to use Physics Picking for mouse events by Sauermann · Pull Request #925 · godotengine/godot-demo-projects · GitHub

1 Like

Yeah add a sprite and a subviewport. Then add some 2d Elements like a label as a child of the subviewport. Set the viewport render mode to “Update Always” and then set the 3D sprite texture as a viewport texture. Make the viewport texture point towards the subviewport.

Keep in mind its kinda laggy so make sure to have this auto turn off if ur character looks away.

1 Like

Didn’t work in my version i don’t know why

It worked.

Thanks for the solution, also nice repo.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.