[BUG Crash] Crash when Cloth is not master skeletal mesh component

Steps to reproduce:

  1. Create new Character blueprint.
    2. Add new skeletal mesh component as Child to the default mesh
    component.
    3. Make sure that Mesh component DO NOT have any cloth simulated parts.
    4. Add mesh with cloth simulation to the newly added skeletal mesh
    component.
    5. In Blueprint construction script, make the new component as
    slave to Mesh Component.
    6. Place character in level.

Now it will crash. The crash is related to the fact, that if the clothing is added to slave component, there are not transforms copied.

Hi iniside,

I’m having some trouble reproducing this. I’m using the third person template project with a cloth mesh I imported onto the Mannequin . I’ve tried this with a brand new character BP and the existing character BP in that template, but I cannot reproduce the crash.

Do you have an example you could send me?

Hey

Here are all meshes + ready to go character blueprint.
All you need to do, is to place character in level and press play.

Tested on Master:
33fc9e16bfb437ddcd25e1f1f6b5b5509710ef91 (github).

Link:

Hey iniside,

I looked at your project and saw that your mesh with the cloth has more bones than the base mesh (leaf bones), which is fine, but does not play well when combining cloth and SetMasterPoseComponent. We had a bug a little while back that was marked as By Design/Won’t Fix because we have a method that we recommend over SetMasterPoseComponent. We generally recommend using Copy Pose from Mesh in AnimBPs.

See UE-34182

For your case, another alternative would be to treat your cloth as an attachment instead of part of the base itself. You can give it it’s own bone structure and attach it to the hips.

Hey thanks.
Use of attachments seems pretty straight forward and I will definitely try it later to see how it works.

Could you give some example, how to solve it using Copy Pose from Mesh ?

It’s actually pretty simple. Instead of using Skeletal Mesh components in your BP, you’ll use PoseableMesh components. You can then use the “Copy Pose from Skeletal Component” just like you would with a master pose node.

Another way is to use Copy Pose From Mesh in the AnimBP(with skeletal components, not poseable). You’ll need to cast back to your CharacterBP to get the parent mesh. This thread has a basic set of screenshots on how to use it.

Note: These are two distinct ways of doing this. I don’t know how well the poseable meshes handle extra bones, but the AnimBP method should work.

Hye thanks.Methotd with Poseable mesh doesn’;t work (no loth sim), but the methotd with anim blueprint works like a charm.