Persona AssetPlayer CurrentTime (ratio) node reference to animation is broken

I noticed that some of my calls to CurrentTime (ratio) in my persona state machine were always returning 0 even tho the animation had been playing. The repro steps are as follows:

  1. Create an anim state machine
  2. Add 2 animations to play chained together such that when Animation A if close to ending, it transitions to Animation B
  3. In the transition rule from A to B, call “CurrentTime (ratio) Animation A”. If it’s > 0.9, transition to animation B.
  4. Now go back into Animation State A and delete the Animation A the is piped into the final animation pose.
  5. Add Animation A back into Animation State A and hook it back into the final animation pose.
  6. Play the game and watch the value returned from “CurrentTime (ratio) Animation A”. It should always read 0.
  7. Now if you stop and go back to the transition rules from A to B, you can put down another node for “CurrentTime (ratio) Animation A” and it will correctly output the current time ratio.

So deleting the animation the node references breaks the node even if you add the same animation back. There’s nothing that says the node has an invalid reference, so it’s hard to tell when something isn’t working.

Is this fixed in a more recent version? Is there anyway to fixup the invalid nodes?

Thanks,

-Mark

Hi ul-marky,

This is expected behavior. The “CurrentTime” nodes are context sensitive to the animations in the “From” state for that transition. When you add a new “Play Animation” node, it is considered unique even if it uses the same Animation Sequence. You can see what I mean by adding two “Play Animation” nodes of the same animation with a blend to the “From” state.

Since 4.9, we’ve had “Relevant Anim Time” nodes that would suit your situation well. What these do is they get the time remaining for whichever animation in the “From” state is blended in the most.

-.