Tweaking Animation Timings

Hey everyone,

Quick question: I’m tinkering with animation timings for various actions. I want to speed up each animation independently. The goal is to fine-tune things like jump functionality directly in the code, avoiding the hassle of going back to the animator for every adjustment. Any tips on making animations run faster?

Thanks!

Hi @Kaverappa!

As far as I know you cannot change the speed of individual states of the anim component by script.

What you probably could do is adjust the speed based on the current animation.

if (this.entity.anim.baseLayer.activeState === 'jump') {
    this.entity.anim.speed = 2;
}
else {
    this.entity.anim.speed = 1;
}

1 Like

Let’s say animation is 1 sec and the speed is 2 but I need animation to be completed in 0.5 sec.How do I do this?

If the duration is currently 1 second with a speed of 2, I guess the duration will be 0.5 seconds if you use a speed of 4?

maximum speed that can be set for this.entity.anim.speed is 2 right?

Sorry, I’m not aware of a maximum speed.

Maybe you can modify the animation in Blender or something.

That is an option but I need to do that everytime I change a config, for example If player jumps and I change Jump movement complete time I need to change animation too. So was checking if there is any better option.

I’m afraid there is no better option.

1 Like