I am trying to get time spent until an animation frame.
I have this function; but: When i get lenght of the animation clip (which has 3 frames) with
animationClip.length, it says 0.4, which is correct. But when i use this function and enter frame as 3(which it should give me lenght of the animation), it gives me something like 0.05.
How can i solve this issue?
public float FindFrameTime(AnimationClip animationClip, int frame)
{
int totalFrames = Mathf.FloorToInt(animationClip.frameRate * animationClip.length);