T
T
th0m4sXD2017-06-25 22:03:52
2D
th0m4sXD, 2017-06-25 22:03:52

Animation speed change?

In the game, you need to change the animation speed in accordance with the running speed, when I change the frameDuration - the animation twitches, I tried to change it on the zero frame - the same thing, how to deal with it?
libgdx

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
th0m4sXD, 2017-06-25
@th0m4sXD

mb someone will need
if (needToSetDuration && animation.getKeyFrameIndex(stateTime)==0){
animation.setFrameDuration(animation.getFrameDuration()-0.001f);
stateTime=0;
needToSetDuration=false;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question