This has been driving me crazy. I am getting a glitch in my animation poses when I try to change the pose and the skeletal mesh transform in the same frame. I’m trying to get a character to stand up from ragdoll, and I followed the excellent training video explaining how to do it with snapshot poses.
However, the process doesn’t work exactly for me, something to do with the fact that before ragdoll, the character is attached via constraint to my player’s hand (I’m throwing him).
But here’s the problem. He’s on the ground in ragdoll, detached from his capsule. I cache a snapshot pose and display that as I go from simulated physics to non-simulated. That works fine. Now I have the animated snapshot pose displayed and I need to reattach the skeletal mesh to his capsule. I would think that could just attach the mesh to the capsule and keep the world position. But there’s a glitch - the animation seems to lag a frame behind or something.
I tried a workaround, by creating a second snapshot pose where take the first pose and transform its bones manually so that it looks the same when attached to the capsule, keeping the relative transform the same as it needs to be for the animations that will follow. Again, the one frame glitch.
It seems like the animation graph is mistakenly not incorporating the transform changes I make in the Event Graph at the same time I am requesting the AnimGraph to switch poses. If there is a blend time greater than zero between the two poses, then it actually goes to the wrongly transformed pose and then slowly blends to the right one. So it seems like the AnimGraph is actually caching this incorrect pose from the first frame.
I’ve tried so many things. Making the skeletal mesh tick follow the component that changes the transforms didn’t work. I tried making a custom animation curve which goes immediately to the final frame – it doesn’t work, it still seems to want to display the very first frame of the animation.
In case I didn’t describe the problem clearly, here it is again. I have a pose which is displaying correctly. But I need to attach my mesh to its capsule, and when I do that, the pose is going to be displayed incorrectly because the transform changes. So I precalculate the correct pose for the new transform, and I tell the AnimGraph to switch to the new pose at the same time I attach the mesh to the capsule. It works, but there’s a glitch because the graph seems to either lag or be ahead of the transform update.
Anyone know what I am talking about or have suggestions on what I can try to fix it?
Thanks!