Hello im trying to make a visual Cooldown, but the command in the unity Api is not working. This sets the counter cooldown. (which works, what doesn't work is the visual part) Code (csharp): if (Time.time > PlayerNextCounter) { PlayerNextCounter = Time.time + PlayerCounterCD; PlayerCounterIMG.fillAmount = 1; PlayerCounterIsInCD = true; } This is in update() Code (csharp): if(PlayerCounterIsInCD == true) { PlayerCounterIMG.fillAmount -= 1.0f / PlayerCounterCD * Time.deltaTime; } I followed the example, yet it is not working. The counterimg is a image of type Filled in radial 360. Any ideas what is wrong here?
Looks like the formula is wrong.It should be something like Code (CSharp): fillAmout = (Time.time - cooldownStartTime) / cooldownDuration