Create 3DGUI in 3D scene


http://www.hightopo.com/demo/Wireframe/
Hey guys, how do I create a 3DGUI in my scene that will follow my camera orientation, always look at the camera, and get all the information about my model and display it

As usual @ranwei-001, please try to narrow a bit the issue and come with a playground we can start to work on.

You can find all the GUI documentation here:
https://doc.babylonjs.com/how_to/gui
https://doc.babylonjs.com/how_to/gui3d

@ 塞巴万绝地议会
https://www.babylonjs-playground.com/#4AJ16M#114
This is my PG, I want to implement a 3DUI, next to the model, and always look to the camera
image
You can help me to implement a simple example for my reference, thank you very much

Use a plane mesh,
BABYLON.Mesh.CreatePlane()
Apply ‘Billboard mode all’ on the mesh and use
BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh()

1 Like

Hey!Remember the last time I asked you a question, you asked me to use createplane as 3DUI

Yes,

BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh

https://www.babylonjs-playground.com/#4AJ16M#134


I made one, but I need a background, what should I do, the color is too dark

just add a rectangle prior to adding the text,
https://www.babylonjs-playground.com/#4AJ16M#135

The GUI overwrites the material,
so you’ll have to use a GUI Image
https://www.babylonjs-playground.com/#4AJ16M#138


https://www.babylonjs-playground.com/#4AJ16M#139
@aWeirdo
I found it’s not too good, for example, I want to according to the load of data to display different content, then this position is bad, I need to manually adjust every text content, let him be consistent, and I want him to follow my camera to move, never look at the camera, I tried textplane lookAt (camera. The position), d but it seems to have problems, how should I solve it?

@aWeirdo
Hey my friend ,I have a problem
https://www.babylonjs-playground.com/#4AJ16M#143 this my pG,I want to click the image on the UI and open a new page, but the mouse event cannot get the information of the image, only Textplane can be obtained. How can I get the image

@aWeirdo
Hey my friend ,I have a problem
https://www.babylonjs-playground.com/#4AJ16M#143 this my pG,I want to click the image on the UI and open a new page, but the mouse event cannot get the information of the image, only Textplane can be obtained. How can I get the image

Look at Use the Babylon GUI - Babylon.js Documentation

You need textBackgrounds.isPointerBlocker = true and then you can use onPointerDownObservable on the image.

Thank you

hey @sebavan @ aWeirdo
do you know how make GUI of the BabylonJS Editor ?

Sorry, this doesn’t seem to work
click on the model and the billboard will appear
https://www.babylonjs-playground.com/#4AJ16M#157


image