SLATE Animator speed doesn't work?

Slate Forums Support SLATE Animator speed doesn't work?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #875
    bloodreddeer
    Participant

    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?

    #880
    Gavalakis
    Keymaster

    Hello,

    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.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #891
    bloodreddeer
    Participant

    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.

    #893
    Gavalakis
    Keymaster

    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.

    Join us on Discord: https://discord.gg/97q2Rjh

    #952
    gradiustheguide
    Participant

    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! 😀

    #955
    Gavalakis
    Keymaster

    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;

    Let me know if that works for you.
    Cheers!

    Join us on Discord: https://discord.gg/97q2Rjh

    #958
    gradiustheguide
    Participant

    Works like a charm, looking forwar dot the update! 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.