I have a metahuman that has a separate skeletal mesh for Face and Body, and separate physics assets. It works for the most part, but when I move the character around, the head will momentarily separate from the body before snapping back.
Any help appreciated on resolving the issue, thank you!
Update: I managed to come up with a solution to my problem.
Unfortunately, I found out this solution disables facial animations, I am currently working on a way to get them back. If I figure it out I’ll update my post.
I used the “Set Leader Pose Component” node in the construction script of my blueprint character to force Body to be the “leader bone component” of the target Face.
However, this will cause physics simulation on the face to be ignored.
The trick I used as a workaround, was that I copied my Face mesh into another skeletal mesh component called FacePhysics, which is also a child of the body mesh.
I set FacePhysics to be hidden in game and invisible, but it will still respond to collisions and simulate physics. I then turned off collision completely on my Face mesh, which is the one actually rendered.
FacePhysics has its own animation blueprint, which simply uses “Copy Pose From Mesh”. Note that the animation blueprint for Face will now be ignored, since it will be driven by the animation blueprint of Body now.
Then in the animation blueprint for Body, in the event graph, on the “Event Blueprint Update Animation”, I call “Get Bone Transform” on the “head” bone of FacePhysics (using Parent Bone Space for “Transform Space”), and store its rotation into a variable. Then in the animation graph, I call “Transform (Modify) Bone”, passing in the rotation variable, and set “Rotation Mode” to “Replace Existing”, and “Rotation Space” to “Bone Space”.
Now what ends up happening, is that FacePhysics will respond to collisions and simulate physics, and will still be attached to the body, but “Copy Pose From Mesh” causes the translation to be off, separating the head from the body, particularly when the character moves quickly. But we don’t care, because it is hidden!
Face, which is shown, is fully attached to the body thanks to “Set Leader Pose Component”. And, it benefits from the rotation of the head due to physics collisions, because we change its rotation manually in the animation blueprint, pulling from the rotation ONLY of FacePhysics. Now we can rotate the head with physical animation without it ever detaching from the body.