Reputation: 2102
I have the following sprite animator:
I want to reproduce all 10 sprites on first loop, but on second loop I want to start at sprite number 6. That's because the 5 firsts sprites are from make a good transition to walk to run, but once zombie is runing these sprites look weird to repeat.
Is it posible to do?
Upvotes: 1
Views: 1773
Reputation: 439
As per usual there are many ways to solve this problem. It seems like the easiest way to solve it would be to have three walking animation states. OnStart => Walking => OnStop. Where OnStart and OnStop play a single time. Use all 10 sprites for your on start animation and then use sprites 6-10 for your walking animation. So when your character starts to move it plays the OnStart animation once and transitions straight into the walking animation. For extra credit you could make a stopping animation where similarly when the character stops it plays a one-shot unique animation of the character coming to a stop. If you are attempting to have the complete spectrum from stationary=> walking=> running my suggestion would be to research how to use blend trees. Basically you will end up having an "idle","walking", "running" animation and based on the speed of the character unity will blend those animations together. But my first suggestion would be the simplest.
Upvotes: 1