fran

Hey, I've been working with spine and the libgdx runtime and I want to do the following:
I have a standby animation looping and when I touch the screen I want to display another animation.
But the step between both animations is huge and it have to be smoothed. So I took a look at the MixTest included with the runtime, and it does what I wanted, smooth transitions between animations. But is kinda tricky because I've tried a lot of tweaks with the time and I can't still get it working. I've tried that:
if(touched && time < 0.5f){ // the transition
standbyAnimaton.apply(skeleton, time, true);
touchedAnimation.mix(skeleton,time,false,time/0.5f);
}
else if (touched){ // the touched animation
touchedAnimation.apply(skeleton, time, true);
}
else{ // the standby animation
standbyAnimaton.apply(skeleton, time, true);
}
Note: in the touch event I reset the time.
fran
  • Сообщения: 7

Nate

What is the problem? Maybe print out what animation, the time, and what if block you are in to help you debug.
Аватара пользователя
Nate

Nate
  • Сообщения: 9288

fran

the problem is that the transition is not done.
When transition should be done the standby animation keep going normally, and after that when the touch animation should be displayed it is played with its bones in he position of the last frame shown during the standby animation
fran
  • Сообщения: 7

Nate

The MixTest works. Maybe this will help:
https://code.google.com/p/libgdx/wiki/GettingHelp
Аватара пользователя
Nate

Nate
  • Сообщения: 9288


Вернуться в Editor