2D Toolkit Forum
2D Toolkit => Support => Topic started by: FZGames on August 13, 2015, 12:30:01 pm
-
Hey, I wondered if this was possible (and if not, I thought I might suggest it as a feature!) -
With a TextMesh, am I able to loop through the character objects it creates and affect individual ones? For example, in Shovel Knight, certain in the text might wobble, or undulate in a sine wave etc., in order to do that we'd need to be able to access and manipulate the individual characters from an array or something.
-
Hi,
There's an easy way to do this by simply grabbing the TextMesh.GetComponent<MeshFilter>.sharedMesh and manipulating that directly. You'll have to modify this every frame so that probably makes the most sense, as opposed to trying to do anything with the textmesh itself... You can safely assume that each character consists of 4 vertices in the mesh and manipulate accordingly.
-
Aha, thanks! I will try to learn more about manipulating a mesh!