I have an animation clip with 9 animation frame in range 0.00 and 0.09, 1 frame every 0.01 seconds and trying to set the animation to be random using the setCurrentTime() method. however, when I enter 0.09, it is displaying the animation at 0.06 seconds for some reason.
This is how my code looks like:
var random = cc.math.randomRange(0.00,0.09).toFixed(2);
var animation = this.node.getComponent(cc.Animation);
The problem is, even if the value 0.09, it is displaying the animation at 0.06 seconds. If I get the Current animation time it is return 0.09 which is correct yet it is not displaying the animation I am expecting.
An other weird thing is that in order to be able to set the animation time the animation need to play and then I need to stop it. If the animation does not play, I can not change the animation. So that is why I am stoping the animation after setCurrentTime() in case anyone wondering.
Does anyone have any idea why is this happening?