- Home /
Animation speed
Hi mates!
I'm playing with animation speed and I wanna realize a general script that allow me to put the script on an animated object and change animation speed of the default animation. Now I'm playing with " animation["Walk"].speed = -1.0; " but in this case I need to declare which animation engage for the operation. Is there a way to change speed for the default animation?
Tnx!!
Answer by Mike 3 · Jan 03, 2011 at 04:46 PM
You could use animation.clip to try get the name of the default one:
animation[animation.clip.name].speed = -1;
Answer by soulzero · Jan 03, 2011 at 04:53 PM
Try using the Animation Events Feature of the Animation View & Curve editor. You could use the curve editor & add animation events that can be called from a script.
Answer by KarlKarl2000 · Feb 12, 2017 at 04:18 PM
Sorry to necro a thread. But in case others find this thread like me.
Meat's answer is good. But it also speeds up all the animatons on that particular layer.
Unity came up with a solution (finally) after a couple years.
sharing is caring