|Topic was automatically imported from the old Question2Answer platform.
I’m making a game in VR and I need some text but i coun’t find any node that can help?
I need some flat text editable from the Godot UI or by code.
Anyone know some solution?
See the 3D waypoints demo for an example of this.
Is my way (the way i suggested) good or do it needs any improvement?
I use to do this without any error but I am wondering is this the best way.
Help me please | 2021-07-23 04:46
Help me please, using your method is perfectly OK for static UI. I use that myself for all my menus, but the important distinction here is that even the nodes are “in a 3D scene,” you’re actually displaying a 2D scene over your 3D one. It’s still a 2D scene and it acts like one.
For “in-world” 3D text elements (such as name tags), you would want the text to act like a 3D element by being anchored to a certain point in 3D space. You can estimate this point through the use of camera raycasting with Spatial node, essentially what Callinou was suggesting with the “3D Waypoints” tutorial.
However, that isn’t the perfect solution either, as the text element will not resize at all, no matter how far it is from the camera (without scripting).
For this reason, the ultimate in-world solution text is to use a 3D Sprite with a Viewport texture as Snail0259 was trying to suggest but with only half of the essential details and no instructions. The 3D sprite is an actual 3D element and its display is very intuitive for the game designer.
I hope it’s somewhat informative!
Yuminous | 2021-07-23 05:34
I am 70% noob that’s why I don’t know much.
Thank you again for the information
Help me please | 2021-07-23 13:02
|Help me please
You want to show 2d text in 3d environment?
The best way I know is:-
- Convert your
spatial root to
- Then add a
label to your scene.
- Set its position, scale, size in 2d editor.
- When you will run the scene you will find the label where you had set its position
Rather than label you can also use other control nodes to do so
I always use this way to display my UI in a 3D scene