Friday, June 10, 2022
HomeGame Developmentgraphics programming - Drawing a crammed ellipse in Unity

graphics programming – Drawing a crammed ellipse in Unity


For my Unity puzzle sport, I’m trying to attract elliptical “shadows” underneath sure letters in a Textual content Mesh Professional textual content subject.

These shadows can have various widths relying on the width of the letters, and the variety of letters lined by the shadow. The next image exhibits three potential examples of one-letter, two-letter and three-letter shadows.

enter image description here

I’ve calculated the width of every letter, and between that and the kerning… I do know what the semi-major axis of the ellipse needs to be. (The peak/semi-minor axis will at all times be the identical.)

I perceive that it is potential to attract an ellipse utilizing a Line Renderer. Is there a equally easy means to attract a crammed ellipse? There would ideally be 4 inputs:

  • Width (semi-major axis)
  • Top (semi-minor axis)
  • Shade of the fill
  • Shade of the border

(If the colour of the fill and the colour of the border must be the identical, that’s completely acceptable.)

Any recommendations on how to attract such a crammed ellipse in Unity? Thanks!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments