- Home /
Is it possible to get the points along the outline of 3dText?
My goal is to use a 3d object, like a sphere for example, and place them in the shape of the text that is specified. I achieved this effect in Java using glyph vectors, but I have no idea how to achieve this in Unity. My ultimate goal is to let the user specify a TTF font, type some text, then have the sphere objects create the shape of that text.
Any help would be greatly appreciated!
Answer by Owen-Reynolds · Jun 27, 2014 at 06:07 AM
This would be a giant pain to extract. The mesh it builds is only rectangular outlines of the letters, not the exact shape. The letter pictures are dynamically arranged on the texture, and move around. Don't think we even have access to the TTY-to-texture code (which is where the glyphs live?)
My best shot might be a screen grab of each letter, then some fake raycast-like analysis to find the edges and corners. But then the inside of a's and e's, or the dip in u's and y's ... ugg.
That's what I was afraid of. I was trying to allow the user to use whatever font they wished, but I may just have to limit it to a couple of fonts I define.
Answer by tanoshimi · Jun 27, 2014 at 06:16 AM
Haven't tried it, but Google found this with source code available in VB - might be possible to port to C#: http://www2.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=50004&lngWId=1