2D Toolkit Forum

2D Toolkit => Support => Topic started by: Follow Me on December 18, 2013, 11:51:44 pm

Title: Ping Pong Animation Not Working in 2.3.3
Post by: Follow Me on December 18, 2013, 11:51:44 pm
Hello Everyone

The Ping Pong animation isn't working for me in version 2.3.3, unity 4.3.1, if you set the animation to Ping Pong it doesn't play.
Has anyone encountered this problem and found a solution?

Thanks in advance.
Title: Re: Ping Pong Animation Not Working in 2.3.3
Post by: unikronsoftware on December 20, 2013, 05:32:30 pm
Hi,

Apologies, this is a bug caused by a typo when merging some code.
You can fix it by changing tk2dSpriteAnimator.cs, line 633 to:

Code: [Select]
int currFrame = (currentClip.frames.Length > 1) ? ((int)clipTime % (currentClip.frames.Length + currentClip.frames.Length - 2)) : 0;
Title: Re: Ping Pong Animation Not Working in 2.3.3
Post by: Follow Me on January 07, 2014, 10:12:41 pm
This solved the problem, thanks a lot!!!