Need Help with Text Positioning on Mesh from All Sides

Hi everyone,

I’m working on a project where I need to position a text on a mesh and then cut it out. I’ve managed to get the text to appear correctly from the front and top views, but I’m having trouble with the sides. When I position the text on the sides, it gets rotated by 90 degrees, and I want the text to remain upright.

Here’s an example playground to illustrate the issue: Example Playground.

Could someone please help me with the correct positioning of the text on the sides of the mesh so that it always looks upright?

Thank you!

Something like this might be easier to manage https://playground.babylonjs.com/#FODYNR#4

One liner :see_no_evil:

text.lookAt(text.position.add(pickInfo.getNormal(true)))

Thanks for your help, that did the trick!