[Bug] Relevant Anim Time Remaining Doesn't Work when state has been copied and pasted

  1. Open ThirdPerson Example Project, then open the character’s AnimBP

  2. In the transition from JumpEnd to Idle, change the transition to read: GetRelevantAnimTimeRemaining <= 0.0f.

  • See attached image for example
  1. Compile, play. Observe the jump ends correctly and the player can still see the walk animation afterwards.

  2. Back in the AnimBP, copy and paste the JumpEnd state. The newly pasted state does not need to be hooked up to anything (although it can be)

  3. Compile, play. Observe that after jumping, the AnimBP never leaves the JumpEnd state and you won’t see the walk animation when moving. GetRelevantAnimTimeRemaining and all similar functions return FLT_MAX (unless clamped, in which case they always return 1.0f)

Expected Result: When a state is copied and pasted, GetRelevantAnimTimeRemaining and related functions still return valid numbers based on the original JumpEnd state.

Repros 100% in: 4.16, 4.17, although I believe this affects all versions. I was unable to find this bug on the forums or Issues Tracker, so thought I’d post it.

.

Hi,

I am unable to reproduce the results mentioned above. Maybe I’m overlooking something. Would it be possible to send me some some screenshots of how you have the rest of your anim Blueprints setup or a video/GIF of the results that you are seeing? Any more information you can provide will be helpful.

-Thank you

Sure. I didn’t save the project, so I redid it and captured the whole thing. It only takes about a minute to reproduce.

I run the game a couple times. Notice the incorrect behavior is only after I have copied and pasted the JumpEnd state. This was using the ThirdPersonExample in 4.17.2, but can be done with any project in most any version.

Not sure where to host the video (since mp4s aren’t allowed on here???), so here it is on Google Drive

For more clarity of the effects of the bug: When a state is copied and pasted, all “Relevant Anim” functions cease working for the original state (in this example, JumpEnd). Any of those functions still work for the pasted state, just not the original. So functions for JumpEnd_1 work, but not the original JumpEnd. This continues as long as the pasted state exists, as shown in the video.

Hi,

Thank you for posting the video. I looked into it and the bug has already been recorded. If you would like to keep an eye on it, you can do so here in the public tracker. If you have any other questions regarding the issue above, let me know and I will get back to you.

-Thank you

I thought I was going insane. Glad this is getting resolved.

Hi, the fix is a little insufficient because it doesn’t retroactively solve existing broken states, we’ll lose tons of work if we go that far back in time - it wasn’t evident there was a problem until a lot of work had progressed.

This is not fixed in 4.19, my Get Relevant Anim Time Remaining nodes still do not work in some cases. Nothing I do fixes them. The animations that existed before they randomly (as far as I can see) broke still work, but when I use a different animation or blendspace with all the same settings and near-identical animations they don’t. Anything I add after the fact does not work.

Maybe you fixed this single cause of the bug, but you haven’t fixed the bug. I do not know how to reproduce it, it just happens while I’m building a large animation blueprint after a while.

I can’t provide a project, NDA.

My bug is different after all. I had the bug shown here as well as something related to my apply additive being factored in. Gotta do a separate bug report for those, for now I’ll apply them elsewhere - either that or I’ve got them setup wrong, I’ll look later.

I’m not the dev, and I haven’t tried the 4.19 preview yet, so I can’t confirm if the bug was fixed.

But there is a way to clean up states that are not working, regardless of version. Copy everything that is in that pasted state, then delete the state. Make a new state through the right-click menu and give it the same name. Then paste the nodes back into the new state.

You will have to redo all the transitions, events, and blends still, but at least the state will have been copied and now all the nodes should be fixed. If you are still running into issues, it’s possible that there are other bugs occurring for you, that are separate from this one.

Good luck!

I can confim I’m seeing issues with copying/pasting ‘Get Relevant Anim Time Remaining’ nodes in 4.19.

I copied and pasted a State Machine from inside an Anim Graph into another Anim Graph.

Inside the state machine were a number of states and a number of transition rules.

In the pasted version, the ‘Get Relevant Anim Time Remaining’ nodes in the transition rules stopped working until I deleted them and re-added them.

I was having the same issue until I realized I had to uncheck Loop Animation for the animation in my state. For some reason looping animations don’t set the Relative time remaining values.

That’s completely unrelated FYI