Hello Guest

Author Topic: TextMesh - Manipulate individual character?  (Read 5115 times)

FZGames

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
TextMesh - Manipulate individual character?
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: TextMesh - Manipulate individual character?
« Reply #1 on: August 14, 2015, 09:59:52 am »
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.

FZGames

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: TextMesh - Manipulate individual character?
« Reply #2 on: August 18, 2015, 03:45:08 pm »
Aha, thanks! I will try to learn more about manipulating a mesh!