Spine - Set animation time or frame number

Hi,
I’m trying to start a spine animation at its half instead of its first frame.

So far I found nothing to help me do that.
I searched for “setFrame” or “setTime” without success.
I also tried to call that line once per frame to skip but it was no good ^^’

 mySpineAnim._sgNode.update() 

Any ideas?

Thanks :slight_smile:

As I know, there isn’t any interface of Spine runtime for the requirement.
Maybe you should take a reference of the Official Spine documents.

->setTimeScale();

1 Like

This sets the speeds as I understand it, but I’ll test if more nontheless.

Hi,

spTrackEntry struct has variables animationStart, animationEnd and animationLast which you can change just after you set animation.

anim->setAnimation(0, "animation", true);
anim->getCurrent(0)->animationStart = anim->getCurrent(0)->animationEnd * 0.5;

also in some versions they are named time, endTime and lastTime.

1 Like

take it easy