Animator - Animation State normalizedTime is not normalized

Normalized value is meant to be between 0 and 1.

   void Update()
{
	AnimatorStateInfo asi = GetComponent<Animator>().GetCurrentAnimatorStateInfo(0);
	float norm = asi.normalizedTime;
	Debug.Log(norm);
}

Amazingly (or most likely sadly…) this will display anything from infinite negative to the opposite.

I have difficulty this is meant to be this way. Or someone needs a refresh on normalized value.

I am still using 5.3.3 so is this part of the whole “We screwed it all” version or is it still in the latest one as well and honest…that can’t be…

I understand I can’t add some code to check and stop the animation but this is just pure solid gold rubbish.

I think it mean normalizedTime return value > 1 beacause animation is looped. You can get fractional part of float like this:

float norm = asi.normalizedTime % 1;

It will be between 0…1

Normalized value is meant to be between 0 and 1.
Where did you get that from? Normalized vectors have a magnitude between 0 and 1, yes. But normalizing doesn’t mean putting everything between 0 and 1.

The integer part is the number of time a state has been looped. The fractional part is the % (0-1) of progress in the current loop.

So if your normalized time is > 1, you finished your animation at least once.