- Home /
Rotating TextMeshes
Is there a way to rotate a 3D text and at the same time, correct it's position? Is there a method that I don't know.
I have the problem that my text should be in center above an sphere, but it's just from one side, if I walk around this sphere, the text isn't centered anymore.
It's a little unclear precisely what behavior you're looking for, but I can ensure you that all sorts of rotations and positioning of 3Dtext is possible. :)
The 3d text is just a texture on a flat piece of mesh. For all intents and purposes, it behaves exactly like any other 3D model. If you describe in greater detail what your situation is, perhaps we can help you come up with a solution.
This is how it should look like from all sides:
this is how it shouldn't look lile:
Okay, I get it. Since the text is readable from all directions, I get the feeling that you've already implemented bill boarding on the text, right? I.e. there's a script that constantly makes the text face the viewer, right?
$$anonymous$$aybe your text needs to be aligned center? Is it still left aligned?
I reposition the text on the x-axis, so from the "normal" start direction it's in the middle of the sphere.
The text is centered and I rotate the text to the player with the LookAt method.
Answer by foulquesnera · May 28, 2019 at 09:46 PM
Add "empty object" 2 in the object, and add TextMesh attribute to this object 2. You can then rotate the "empty object 2" in the main object.