How to stop an animation

hello, i habe a little issue. may be is a newbie problem.
i want stop an animation when it finish.

i tried using LoopMode();

here is my code.
public void ejecutarAimacion(String nombreAnimacion, Spatial nodoParaAnimar){
control = nodoParaAnimar.getControl(AnimControl.class);
channel = control.createChannel();

animation doesn’t stop when is finished.

thanks for answers.

1 Like

im printing the LoopMode


i already seted the ModeLoop on “DontLoop” but it is always “Loop”

It should work unless you do something weird in the onAnimCycleDone of the AnimEventListener
What do you do in that method?

Ahh, I’ve run into this.

When you do setAnim it resets the loop mode and the speed to the default settings.

You need to do setAnim first and then set the loop mode and speed after.

1 Like

thank you is resolved, the sequence of the methods was the problem

thank you very much

1 Like

No worries. Thanks for asking a question that was clear, concise and had all the needed information. :slight_smile: Those seem like a rarity sometimes :frowning: