Solution for displaying text/label in 3D

Hello everyone!
I am developing a game that runs continuously with the occurrence of calculations on the road. My idea is to use a Label component attached to the model but it seems the Label needs a Canvas component to render. When I use Canvas the text is displayed above the models that are in front of it.
I use version v3.4.2
Please help me!

You can refer to :cocos-test-projects/assets/cases/2d-rendering-in-3d at v3.4 · cocos/cocos-test-projects · GitHub

1 Like

Thank you for your response! <3
I was referencing that project and I don’t understand how a sprite/label can move in 3D.
Can you explain more about the idea of the project and how it works?


You can refer to this script.

1 Like


I assigned it to a sprite/label and modified the code from x-axis to z-axis and it didn’t work.
I wanted a solution that would allow me to freely drag and drop it on the editor and mount it anywhere in 3D space (like models or nodes 3D).

Currently does not support the free operation of ui elements in 3d scenes, you may consider a different program, refer to : cocos-example-ui/rocker.scene at v3.1 · cocos/cocos-example-ui · GitHub

1 Like

Thank you so much! <3

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