- Home /
Particle system with texture sheet animation: first frame is played again when particle dies
Hi!
I'm spawning some particles that play an animation through the option "Texture sheet animation", and it's playing nicely, except that just before they die, the particles play the first frame of the animation again, for what seems to be just 1 frame. The tiling is correctly set, animation plays with the whole sheet, Frame Over Time is a simple ramp, and Cycles is set to 1. I have to tried to change the system lifetime, the particle lifetime, well basically any setting that could be remotely related to the issue, without success.
Note: It doesn't happen on all the particles. Those spawned by a burst have this issue, as well as those spawned through normal emission if the particle system doesn't loop (and even when it's looping for some of the particles, but not all...). Not totally sure about the exact repro, but I have repro it in an empty project without difficulty.
I find it highly odd that I couldn't find anything on this issue already, since the problem is very obvious, so I just hope it's not related to some obscure setting somewhere in Unity that I would have changed without wanting it...
Answer by Grhyll · Nov 02, 2015 at 02:46 PM
Solved by Bgolus here: http://forum.unity3d.com/threads/particle-system-with-texture-sheet-animation-first-frame-is-played-again-when-particle-dies.365214/
His answer: When you have a 4x4 flip book that's 16 frames. If you look at the curve it has 0 to 16, that means the curve is actually animating over 17 frames where if the curve actually gets to 16 it'll loop back to the first frame for a moment. So take the last key and set it to 15.99 instead of 16.0.
Thank you.
Actually I just set it to the 2nd last frame. So if its a 16 frame texture sheet (4x4) it'd be frame 1-16 in whatever art program you're using. In Unity I just set the curve (Frame over time) to go from 0 - 15.
But you're right on the answer on how to fix the flickering last frame. :)
Your answer
Follow this Question
Related Questions
How unity evaluate Random Between two curves type property in ParticleSystem? 0 Answers
Particle System Simulate in editor work wrong with start delay property none zero 0 Answers
Spawning Particle Systems for Gun Sparks 1 Answer
Particle Collision Mesh Occlusion 1 Answer
What would be the "next-best-thing" to a ParticleSystem? 1 Answer