I have defined a six-frame run cycle for a character.
If I press play on the animator, it plays flawlessly.
Now, problem is, when I play the game, the animation skips frames almost at random, and needless to say, it looks like c**p.
Looking at the Animator, the animation state seems to stay on the Walking animation, with no flickering to other states, or transition arrows getting highlighted.
Any ideas?
What does your Animation key frames look like? I suspect that you’re animating too fast and it is giving the illusion of skipping when in fact it is just animating faster than you can see. So your start may be say, 0.10 first frame, and your last keyframe 1.30. It is basically hopping from 1.30 to 0.10, and if your second keyframe is 0.50, you’re hopping 0.10-0.50-1.30 which occurs over a 1.30 second span. This may appear nice, but on run you may notice actual speed of the animation gaps. Although the animation appears smooth in the Animation window, the performance on run may provide a different performance.
Hey there. Thanks for the reply.
As I said, the animation does play back flawlessly when I press play in the animator. It just looks wrong in-game, and I guarantee it’s skipping just the initial and final frames (I captured it on video and frame-by-framed it).
The animation is set to 9 samples (pretty slow) and there’s a keyframe on every tick in the editor.
Also, forgot to mention, it worked fine up until yesterday. Not sure what can be causing it.
I’m at a loss here.
Your Animator is the state machine, no? The Animation is different than Animator.
So I’m confused now. Are you having an issue with the Animation or the Animator?
I’m sorry. That should have been “animation tick” I guess.
Now, I’m not sure about the question. The choppiness appears in the Game window.
Pressing Play in the Animation window looks fine, also in the Game window.
Something else, pretty obvious, but probably worth mentioning, is that needless to say, all of the frames’ resources are where they’re supposed to.
I’m going to bed but do show a screen shot of the Animation window. Provide a video of the error you’re experiencing. I really need something solid in order to help you on this.
I’ll be back tomorrow, amigo ![]()
Will do. Thanks for the help.
Is it sprite animation or bones?
will it help?
I figured it out.
Clicking on the Walking state in the animator, I found out that I somehow accidentally created a transition from the Walking animation to itself.
That enabled the state to transition to itself, and the thing was looping all over the place (it wasn’t just skipping the first and last frames as I had initially thought).
Deleted the transition, everyone’s happy again.
Thanks to everyone who tried to lend a hand.