Position plane in the middle & outer position of tube

Example => https://www.babylonjs-playground.com/#FA2H7X#24

I need the text to be positioned in the middle of the tube, and a bit on the outer of the tube on the XoZ plane.

I tried to do something similar from the parallel line code in Line2D of Given Width - Babylon.js Documentation but I cant get it working.


You should use GUI for that:

You have all the controls you need to align your text

1 Like

Thanks, I will check it

@Deltakosh in my case I will have multiple tubes in my scene, with each one having a textblock.

Is this the right way of doing this? https://www.babylonjs-playground.com/#FA2H7X#25

If so, I still have the problem of positioning the plane. Is this the right way to set the size of the plane?

Or should I be using the GUI in Fullscreen mode?

I ended up creating the GUI in fullscreen mode and linking the textBlock position with that of the tube.

yep this would have been my recommendation :slight_smile:

1 Like