Changing Animation Clip Speed

Hello,

I have a character with a walk cycle and an idle cycle. His walk cycle animation speed moves just fine, but his idle animation speed is too fast.

I tried out the following script in an attempt to slow down my characters idle animation speed:

// Make all animations in this character play at half speed
for (var state : AnimationState in animation) {
state.speed = 0.5;
}

Unfortunately, this script only makes ALL of my animations play at a speed of 0.5. I would like for my walk cycle animation to play at a speed of 2.0 while my idle animation cycle plays at a speed of 0.5.

Does anyone know how I can alter the above script to accomplish this? Or is there an easier way?

Any help is greatly appreciated! Thank you!

–Velk

You could probably do something like:

animation ["idle"].speed = 0.5;

But I haven’t tried it. (obviously replace idle with whatever you named your idle animation)

that did the trick! Thank you so much!

–Velk