Another solution for the camera glitch. The issue is when setting the offset, it was set relative to the object root (which is on the ground), while the camera tracks middle of the capsule. This causes camera to jump half-capsule height, if the character is in the air (on the ground it is mitigated by the capsule not allowed to go under ground). If you get pelvis to capsule offset instead, the camera shouldn’t move at all. Better to do it every time the ToRagdoll is called, because pelvis offset can be different in various animation phases. Now because capsule center follows pelvis (instead of capsule bottom followinf pelvis in the original solution), capsule bottom tends to go underground. So changing the trace to go from tracked location half-capsule down instead will detect when the capsule bottom goes underground and snap it back. And that’s all. There is still small glitch when Ragdoll finishes (seems the physical capsule position is not the same as the tracked one, but I didn’t figure out that yet). Here are the blueprints:
-
At ToRagdoll start (the rest is the same, BeginPlay code removed):
-
Completely reworked capsule tracking (without Vinterp):
In the capsule tracking, I track from pelvis, not from the pelvis+offset, because that location can end under ground. Not sure if it can cause issues with different character.
I just started learning Unreal, so the things can be a bit rough. In any case, thanks for the tutorial, I learned quite a bit, including a few nice tricks.