Search Unity

Help Wanted Rewinding Animation

Discussion in 'Animation' started by Talis_Renston, Sep 25, 2021.

  1. Talis_Renston

    Talis_Renston

    Joined:
    Oct 24, 2016
    Posts:
    19
    Hello everyone,

    I am working on a rewindable 3D action-adventure game right now, for that I am using Chronos but one of the restrictions of Chronos is that Animations can only be rewinded once.
    So if I start at point A and start rewinding at point B and the stop somewhere inbetween, lets say at point C and then stop rewinding and just play forward again I cant rewind the animation further than point C. This seems to be a limitation in how the Animatior-Recorder works.

    Visualization:
    A------C--------B

    My current solution would be to simply store the current animation-name and animation-time every frame (or every x-frames) and then setting them these values when rewinding. This works, but looks kinda stuttery and uses up a lot of memory. This also works rather poorly (or not at all) when I use blend-trees since I do not know what data is needed to recreate the blended animation-clip. I dont seem to have acces to the animation name if it is part of a blend-tree (animator.GetCurrentAnimatorClipInfo(layerIndex).clip.name gives me the animation name but not the blend tree name)

    Is there an easier way I oversaw? I am not the best at animating at all, which makes this task a bit harder for me than it needs to, I guess.

    Thanks for your help already.


    PS. My blend-tree looks like this:
    upload_2021-9-25_16-11-32.png

    and my base layer like this:
    upload_2021-9-25_16-12-0.png

    When trying to get the animation name I only get e.g. "Idle" but not "Idle Walk Run Blend". Thats what I mean with not getting the name of the current animation blend-tree
     
unityunity