0 votes

I'm making a dialog box scene to be reused in my game, however since it is in 3D my options for displaying text seem to be limited.

I want to avoid meshes, and would just like the text projected onto a flat plane in the 3D world.

I've heard talk of viewports but they're honestly confusing to me, and I wouldn't even know how to get the viewport texture onto a plane in the scene.

Not only that, but I want the dialog box to scale as the text progressively gets longer, and I don't know if the viewport can scale like that.

I tried looking up as much info as I could on viewports but any documentation or explanation I can find is usually vague or just conceptual explanations.

in Engine by (12 points)

1 Answer

0 votes

Hey ValueChip,

there is a GUI in 3D Demo. You will find it in the ProjectManagers Templates tab. You should take a look on that. There is also one called 2D in 3D Demo. Those use viewports which is the best way of doing it as far as I know. IF you don't have them, you can download them from the Asset Library.

Good Luck.

by (822 points)

has anyone ever made that work on a different project? I'm trying to do that now in mine.

I've copied everything that demo has done and it didn't work. I've tried fiddling with the settings but still no luck.

In the case of the demo, the child of the Viewport node is a 2D node with 2D children nodes. I did this but didn't see anything after running it.

But what i want to do in mine after that was supposed to work is for the Viewport node to have a child scene instance.

No luck whatsoever so far.

@Jowan-Spooner thanks for the link. I helped me to recreate this into my own game.

The key element for me was to make the Material / Texture of the quad a ViewportTexture.

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.