[solved] AnimationController.setSpeed() doesn't work

When the repeat type for AnimationController is Controller.RT_CLAMP,

AnimationController.setSpeed() is not applied.

I guess "BoneAnimation.update() : 212 line" has a bug.



    public void update(float time, int repeat, float speed) {

        if (boneTransforms != null && keyframeTime != null) {

            switch (repeat) {

               

                case Controller.RT_CLAMP: {

                    if (currentFrame >= endFrame) {

                        currentFrame = endFrame;

                        break;

                    }

                    currentTime += (time);    <= here!



I think it should be  "currentTime += time * speed"

All the other repeat type multiplies time with speed, But only RT_CLAMP does not.

Am I right?

hi…

unsing the AnimationController and BoneAnimations currently as well, i've verified your guess.

It's right, that if RT_Clamp is chosen, the setSpeed() doesn't have any effect.

And your fix seems to be alright as well…

Fixed in cvs…

okay…

@mulove, you might add a postfix [solved] to the Topic.

@renance: haven't there once been a checkBox "solved" in the topicmenu ?

greetz

Hmm, does not look like there's a checkbox icon.  Sorry.