I’m using animator track with applied root motion to animate my character during the cutscene. I wanted one of the animations to play at 0.5x speed so I simply animated the property “speed” of the animator. It doesn’t work in both play mode and preview mode (it ignores the 0.5f value and plays the animation at full speed). What am I doing wrong? How to control the playback speed of the animation?
I have just updated the PlayAnimatorClip and it now has a “Playback Speed” parameter so that you can play different animations at different speeds. I have attached the updated clip (package) for you here.
Let me know if that works for you.
After playing around some more with the “playback speed” I noticed that when you blend from one animation to another and they have different speeds set (lets say 0.5 and 1.5) it results in some unnatural jump instead of smooth blend.
Hey,
Unfortunately I already looked into this, but haven’t yet found a better solution as of now, or the reason this is caused. I suspect that this is just how Unity’s Playables (more specifically AnimationMixerPlayable) works, upon which the Animator Track is build on. Regardless of whether this is true or not though, I will of course keep looking at this and hopefully improve it to avoid this issue caused when the speeds of blending clips are different.
Thanks.
Hi Gavalakis, can we add this playback speed option to the background animator clip ( the clip that plays when no other animator clips are playing?) Would be very handy! 😀
Hey,
Sure! I’ve just added this and will be present in the next version. If you want to add this now manually, you can open up AnimatorTrack.cs and do the following:
– Add a field at the top public float basePlaybackSpeed = 1f;
– Find line in OnUpdate method that reads basePlayable.time = time; and change it to basePlayable.time = time * basePlaybackSpeed;