Why animation speed not changing?

why animation speed not changing?

 Spatial Oto = assetManager.loadModel("Models/Oto/Oto.mesh.j3o");
    Oto.scale(0.2f);
    rootNode.attachChild(Oto);

    control = Oto.getControl(AnimControl.class);
    channel = control.createChannel();
    channel.setLoopMode(LoopMode.Loop);
    channel.setSpeed(0.01f);
    channel.setAnim("Walk");

    for (String name : control.getAnimationNames()) {
        System.out.println(name);
    }

one of the common pitfall of our animation system.
setAnim sets the animation speed to 1.
so you need to do this :
channel.setAnim(“Walk”);
channel.setSpeed(0.01f);

3 Likes

can I play it faster than default animation speed? I need to play two times faster without changing the model in blender…

Did you try setSpeed(2.0f)?

1 Like

no, because in docs :

com.​jme3.​animation.​AnimChannel
public void setSpeed(float speed)

Parameters:
speed - Set the speed of the animation channel. The speed is a scale value starting from 0.0, at 1.0 the animation will play at its default speed.

yell well trust me … try it… it works.

1 Like