- Home /
Quick question about animation length and speed
I'm a little confused about solving for the resulting new length of an animation after changing its speed. If I set the animation speed to 0.8, is the new length origLength/0.8, or origLength*1.2? Because those two equations give me different results.
Answer by PrimeDerektive · Sep 25, 2011 at 04:21 PM
As mentioned in my comment on Kacer's question, I solved the issue. if you want to make an animation have a specific length (for instance, for the sake of balance in my game I want all my different characters' attack animations to have the same length), set the speed to:
animation["animName"].speed = animation["animName"].length/desiredLength;
Answer by Kacer · Sep 24, 2011 at 06:40 PM
Is this what you're looking for?
if so, then an animationspeed of 0.8 would make your animation play 20% slower.
Heh no... I'm already modifying the animation speed, and I'm aware that a 0.8 speed would be a 20% reduction. I was just using arbitrary numbers for an example, my question was how to solve (what the equation would be) for what the new, modified animation length would be after modifying the speed.
I did however figure out that setting speed to:
speed = animation['animName'].length/desiredLength;
Would be an even better solution for what I was trying to accomplish, so I'm just gonna do that :)
Your answer
Follow this Question
Related Questions
Animated Billboard or Animated Model? 2 Answers
Handling Animation and movement speed 0 Answers
How to calculate speed without rigid body 0 Answers
Shift Sprinting Camera Animation Based on? 0 Answers
Animation speed (backward) 1 Answer