Trying to lerp the fill amount of a health bar.
Have this code:
public float lerpSpeed = 2;
public void FillBar()
{
bar.fillAmount = Mathf.Lerp(0f, 0.7f, Time.deltaTime * lerpSpeed);
Debug.Log(emotion.fillAmount);
}
When the function runs, after a click event, the bar.fillAmount goes only to 0.28