Quantcast
Channel: Latest Questions by Griffo
Viewing all articles
Browse latest Browse all 94

Lerp font size, smoothly.

$
0
0
Hi, Is it possible to smoothly lerp a font size? Or can a font only be resized in increments of 1? This is what I have, the score pops out then returns back slower, but noticed the font only increases by 1 not anything smaller giving it a slightly jerky look, is there a better way? function lerpScore(){ j = 0.0; // the last number below is seconds to lerp rate = 1.0/0.2; while (j < 1.0) { j += Time.deltaTime * rate; TextStyle.fontSize = Mathf.Lerp(30, 80, j); yield; } j = 0.0; // the last number below is seconds to lerp rate = 1.0/1.0; while (j < 1.0) { j += Time.deltaTime * rate; TextStyle.fontSize = Mathf.Lerp(80, 30, j); yield; }

Viewing all articles
Browse latest Browse all 94

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>