Announcement

Collapse
No announcement yet.

How to Get Actual length of animation played by blueprint?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Get Actual length of animation played by blueprint?

    Hi All,

    the Return Value from Play Anim Montage only seem to return the length of the current animation as if it's Rate Scale was set to 1.0.
    I often tune the animations in engine by altering the Rate Scale.
    I also use the returned length of animation in my animation system to do other things.

    Is there a way to get the actual length of an animation being played back?

    Cheers, Fred

    #2
    Same question ,Have you found a solution?

    Comment


      #3
      It's been a while since I tried and I ended up making a table with various data associated with each animation.
      That really served me well. Maybe there's a way now but I have looked recently.

      Comment


        #4
        Its Get Sequence Length

        Comment


          #5
          you could set RateScale to be a variable that is editable in the engine and then multiply the return value from PlayAnimMontage with that rate variable.
          EX:
          UPROPERTY(EditAnywhere, Category = "Animation")
          float PlayRate

          DeathAnimLength = PlayRate * PlayAnimMontage(DeathAnim);

          Comment

          Working...
          X