How can I stop an animation? [Solved]

I need to stop an animation, but I cant find any method in AnimControl.class or AnimChannel.class to do it.

stop and pause animation is there in JmonkeyBuilder …

You could try animChannel.setSped(0f);, that’s how I pause animations when necessary.

And you could probably also try animChannel.setEnabled(false); to pause the whole control, although I never did it this way.

2 Likes

I use this two lines of code to stop animation:

channel.reset(true);
channel.setSpeed(0f);
2 Likes

which version of jMB do you use?

1.7.2

how did you do that?

hm, in 1.7.2 you can see the action “Stop” in a context menu…

1 Like