Hello Guest

Author Topic: Issue with animations pausing for a split second if interrupted for another  (Read 5349 times)

Disastercake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Disastercake
I am having an issue where if I interrupt an animation mid-play and then play another, it will make an awkward pause before playing the next animation.  This pause is quite noticeable.  How can I fix this?

Here is a video displaying the issue:
http://www.youtube.com/watch?v=phzq6jzZ7Zo&feature=youtu.be
Working on Soul Saga, an upcoming anime adventure RPG game by Disastercake.
www.disastercake.com

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
This looks like its caused by the animation updating before your function gets called. i.e. its switched to the next frame on your old animation, before your function call to change the frame tells it to change animation, and so it will only update the next frame.

Anyway to fix it you can try one of a few things.

First, in tk2dAnimatedSprite, change Update to LateUpdate and see how that works.

Also, if you know who is calling play on the sprite (if its another script which you have control over), in Edit > Project Settings > Script Execution Order, make sure that script is BEFORE this one.

Hope that helps, at least to narrow down where the problem is occuring.

Disastercake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Disastercake
I found an error in my own code that was causing this bug.  Thank you for the help! =)
« Last Edit: June 01, 2012, 04:14:29 pm by Disastercake »
Working on Soul Saga, an upcoming anime adventure RPG game by Disastercake.
www.disastercake.com

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Glad its fixed :)