UE 5.8 - How do I make a long cape / cloak work on a character (and in a packaged game)?

Hello Unreal Engine team and community,

I am making a small private game for my family in Unreal Engine 5.8, and I need a cape or cloak that works properly on my characters. Below is everything we have already tried, what happened each time, and the code we used. Please check whether we are doing it the correct way for Unreal Engine 5.8, and tell me the method that really works.

NEW SINCE WE STARTED: we have now made a new knight WITHOUT a cape, so the cape can be made as its own separate piece and attached to him. We would like the best way to make that separate cape for UE 5.8.

  1. WHAT I WANT

  • An armoured knight with a long cape that hangs from the shoulders down to the ankles.
  • When he walks or runs, the cape swings freely BEHIND him, away from his legs.
  • When he stands still, the cape moves gently, as if in a light breeze.
  • The cape must never tear, never show holes, and the legs and heels must never poke through it.
  • It MUST work in the finished (packaged) Windows game, not only in the editor.
  • I want the same method to work for my other characters later.
  1. MY SET-UP

  • Unreal Engine 5.8. A Blueprint-only project (no C++ code). Windows 11.
  • Blender 4.5 for preparing models.
  • The character was made with an AI 3D tool (Meshy) and auto-rigged there. The skeleton uses the UE5 Mannequin bone names (pelvis, spine_01, spine_02, spine_03, thigh_l, calf_l, and so on), 70 bones.
  • A light game copy of about 40,000 triangles. The cape is part of the SAME mesh as the body, but has its own material section.
  • The cape mesh from the AI tool is FOLDED and WRAPPED around the body (not a flat, clean sheet).
  • Walk and run animations came with the auto-rig.
  1. WHAT WE TRIED AND WHAT HAPPENED

TRY 1 - Chaos Cloth Asset (the newer Dataflow cloth system)

  • Turned on the plugins ChaosClothAsset, ChaosClothAssetEditor, ChaosClothAssetDataflowNodes and ChaosClothAssetToolset in the .uproject file.
  • Made a cloth asset from the “Skeletal Mesh Cloth” template.
  • RESULT: with these plugins switched on, the PACKAGED game would not start at all. We had to remove the plugins again. (We did not get as far as painting the weights.)

TRY 2 - Cape bones with physics (8 chains x 4 bones, started at the waist)

  • Added bone chains to the cape in Blender and skinned the cape to them.
  • In the Physics Asset: 32 capsule bodies set to Simulated, swing limits of 35 degrees.
  • RESULT: the lower cape folded up and disappeared into the body, even when standing still. With physics turned OFF, the cape looked fine.

TRY 3 - Same bones, spheres instead of capsules, gentler limits

  • RESULT: still folded away. We then found two bugs (see TRY 4).

TRY 4 - Cape bones version 3, hung from the shoulders (5 back chains x 6 bones + 3 front chains x 4 bones)

  • Bugs found and fixed:
    a) The Blender FBX was in metres, so in Unreal the root bone had SCALE 100. All physics shapes were 100 times too big (a 3 cm ball became 3 m). FIX: export in centimetres (code C).
    b) PhysicsAssetToolset.AddConstraint left the joint frames at ZERO (Pos2 = 0, axes = identity), so every cape bone was pulled onto the bone above it and the cape crumpled. FIX: we worked out the real joint frames from the bone positions and set them by hand (codes D and E).
  • Physics set-up (code B): kinematic collision bodies on pelvis (16 cm ball), spine_01-03, thighs and calves; 42 small cape balls (3 cm) Simulated; damping linear 2 / angular 4; angle limits back/forward 30/20 degrees, side 10, twist 4.
  • The character’s mesh collision is set to ignore the Pawn capsule.
  • RESULT in the editor: looked good. RESULT in the packaged game: while walking, the cape TORE APART between the 5 bone strips, the armour showed through holes, and the bottom corners folded out sideways. Standing still, the bottom 25 cm crumpled.

TRY 5 - Stiff cape (all cape bodies Kinematic, no swinging)

  • RESULT: the cape stayed whole and smooth, BUT the heels poked through the bottom of the cape on some steps.

TRY 6 - Reshaping the cape (flat, with a curved “wedding train” at the bottom, away from the legs)

  • Done in Blender. RESULT: torn and stretched bits where the cape met the waist and legs.

TRY 7 - A brand-new flat cape sheet (60 x 36 grid, 8 mm thick), weighted 100% to spine_03 (stiff)

  • RESULT: did not look good enough. A short cape looked even worse.

In the end we took the cape off the character for now.

  1. WHAT WE HAVE NOT TRIED YET

  • The built-in cloth tool on the Skeletal Mesh itself: in the Skeletal Mesh editor, right-click the cape section → Create Clothing Data, then the Cloth Paint tool (Max Distance painted 0 at the shoulders and higher further down), Physics Asset capsules for collision, and the cloth turned on in the Character Blueprint. This does not need the Chaos Cloth Asset plugins.
  1. MY QUESTIONS

  1. In Unreal Engine 5.8, is the built-in Skeletal Mesh cloth (Create Clothing Data + Cloth Paint) still supported, and does it work in a PACKAGED game without any extra plugins?

  2. Why would the ChaosClothAsset plugins stop a packaged Blueprint-only game from starting? Is there a setting or step we missed (for example, a plugin that must be included in packaging, or the project needing to be a C++ project)?

  3. Can the “how free” map (Max Distance) be made automatically - for example from vertex colours painted in Blender - instead of painting by hand in the editor? (We read that 5.8 has a “VertexColorToAttribute” Dataflow node. Is that right, and how is it used?)

  4. Our cape mesh from the AI tool is folded and wrapped round the body. Should we replace it with a clean, separate cape mesh (a simple flat sheet with even squares) before making it cloth? How many vertices does a good game cape need?

  5. Should the cape be its own Skeletal Mesh attached to the body (same skeleton, Leader Pose), or stay part of the body mesh?

  6. Which collision shapes stop the legs poking through (capsules on thighs and calves? one wide capsule between the legs?), and which cloth settings stop it tearing or crumpling at the bottom?

  7. Is our bone method (codes B, D, E) correct for UE 5.8, or is bone physics simply the wrong tool for a long cape?

  8. Please give the exact steps, button names and settings for Unreal Engine 5.8 (not older versions), in the order to do them.

  9. THE CODE WE USED


--- CODE A: plugins we switched on in the .uproject (later removed) ---
"Plugins": [
  { "Name": "ChaosClothAsset", "Enabled": true },
  { "Name": "ChaosClothAssetEditor", "Enabled": true },
  { "Name": "ChaosClothAssetDataflowNodes", "Enabled": true },
  { "Name": "ChaosClothAssetToolset", "Enabled": true }
]


--- CODE B: Physics Asset set-up for the cape bones (Unreal Python, run in the editor) ---
import unreal
PA_PATH = "/Game/Characters/Knight/Rigged_v3/SK_Knight_v3_PhysicsAsset"
EAL = unreal.EditorAssetLibrary
def log(*a): unreal.log_warning("CPH " + " ".join(str(x) for x in a))
class _T:
    cdo = unreal.PhysicsAssetToolset.get_default_object()
    def __getattr__(self, name):
        camel = "".join(p.capitalize() for p in name.split("_"))
        def f(*args):
            return self.cdo.call_method(camel, tuple(args))
        return f
T = _T()
pa = EAL.load_asset(PA_PATH)
V = lambda x, y, z: unreal.Vector(x, y, z)
R = lambda p, y, r: unreal.Rotator(roll=r, pitch=p, yaw=y)
# 1. clear the automatic bodies
for b in list(T.get_body_names(pa)):
    T.remove_body(pa, b)
def _enum(cls_names, key):
    for cn in cls_names:
        cls = getattr(unreal, cn, None)
        if cls is None: continue
        for a in dir(cls):
            if key in a.upper(): return getattr(cls, a)
    raise RuntimeError("enum not found")
KIN_E = _enum(["PhysicsType"], "KINEMATIC"); SIM_E = _enum(["PhysicsType"], "SIMULATED")
LIM_E = _enum(["AngularConstraintMotion"], "LIMITED")
def set_mode(bone, e):
    for st in pa.get_editor_property("skeletal_body_setups"):
        if str(st.get_editor_property("bone_name")) == bone:
            st.set_editor_property("physics_type", e); return
def set_limits(child, twist, swing1, swing2):
    for cs in pa.get_editor_property("constraint_setup"):
        ci = cs.get_editor_property("default_instance")
        if str(ci.get_editor_property("constraint_bone1")) == child:
            prof = ci.get_editor_property("profile_instance")
            cone = prof.get_editor_property("cone_limit"); tw = prof.get_editor_property("twist_limit")
            cone.set_editor_property("swing1_motion", LIM_E); cone.set_editor_property("swing1_limit_degrees", swing1)
            cone.set_editor_property("swing2_motion", LIM_E); cone.set_editor_property("swing2_limit_degrees", swing2)
            tw.set_editor_property("twist_motion", LIM_E); tw.set_editor_property("twist_limit_degrees", twist)
            prof.set_editor_property("cone_limit", cone); prof.set_editor_property("twist_limit", tw)
            ci.set_editor_property("profile_instance", prof); cs.set_editor_property("default_instance", ci); return
# 2. body collision (kinematic, follows the animation)
def cap(bone, cx, radius, length):
    T.add_body(pa, bone)
    T.set_capsule(pa, bone, "col", V(cx, 0, 0), R(90, 0, 0), radius, length)
    set_mode(bone, KIN_E)
def sph(bone, cx, radius):
    T.add_body(pa, bone)
    T.set_sphere(pa, bone, "col", V(cx, 0, 0), radius)
    set_mode(bone, KIN_E)
sph("pelvis", 6.0, 16.0)        # wide seat ball between the legs
sph("spine_01", 6.0, 14.0)
sph("spine_02", 6.0, 12.0)
sph("spine_03", 6.0, 8.5)
for s in ("l", "r"):
    cap("thigh_" + s, 14.3, 8.5, 20.0)
    cap("calf_" + s, 19.0, 6.5, 26.0)
# 3. cape balls (simulated)
chains = {}
for k in range(5):
    chains["B%d" % k] = ["cape_B%d_%02d" % (k, i) for i in range(1, 7)]
for k in ("F0", "FL", "FR"):
    chains[k] = ["cape_%s_%02d" % (k, i) for i in range(1, 5)]
for c, bones in chains.items():
    for b in bones:
        T.add_body(pa, b)
        T.set_sphere(pa, b, "ball", V(0, -9.5, 0), 3.0)
        set_mode(b, SIM_E)
# 4. joints: back strips hang from spine_03, front skirt from pelvis
for c, bones in chains.items():
    parent = "spine_03" if c.startswith("B") else "pelvis"
    for b in bones:
        T.add_constraint(pa, b, parent)
        parent = b
# 5. angle limits
for c, bones in chains.items():
    for i, b in enumerate(bones):
        back = (30.0 if i == 0 else 20.0) if c.startswith("B") else (20.0 if i == 0 else 12.0)
        set_limits(b, back, 4.0, 10.0)
# 6. damping so the cape floats instead of whipping
for st in pa.get_editor_property("skeletal_body_setups"):
    if str(st.get_editor_property("bone_name")).startswith("cape_"):
        bi = st.get_editor_property("default_instance")
        bi.set_editor_property("linear_damping", 2.0)
        bi.set_editor_property("angular_damping", 4.0)
        st.set_editor_property("default_instance", bi)
EAL.save_loaded_asset(pa, only_if_is_dirty=False)


--- CODE C: Blender 4.5 export in centimetres (so bones are scale 1 in Unreal) ---
import bpy, sys
argv = sys.argv[sys.argv.index("--") + 1:]
blend, outfile = argv[0], argv[1]
bpy.ops.wm.open_mainfile(filepath=blend)
arm = [o for o in bpy.data.objects if o.type == 'ARMATURE'][0]
mesh = [o for o in bpy.data.objects if o.type == 'MESH'][0]
scn = bpy.context.scene
scn.unit_settings.system = 'METRIC'; scn.unit_settings.scale_length = 0.01
ad = arm.animation_data
saved = ad.action if ad else None
if ad: ad.action = None
arm.data.pose_position = 'REST'
arm.location = arm.location * 100.0
arm.scale = arm.scale * 100.0
bpy.context.view_layer.update()
for step in (arm, mesh):
    bpy.ops.object.select_all(action='DESELECT'); step.select_set(True); bpy.context.view_layer.objects.active = step
    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
arm.data.pose_position = 'POSE'
# scale every location key x100 once (Blender 4.5 layered actions)
for ac in bpy.data.actions:
    curves = []
    for layer in ac.layers:
        for strip in layer.strips:
            for cb in strip.channelbags:
                curves += list(cb.fcurves)
    seen = set()
    for fc in curves:
        key = (fc.data_path, fc.array_index)
        if key in seen or not fc.data_path.endswith(".location"): continue
        seen.add(key)
        for kp in fc.keyframe_points:
            kp.co.y *= 100.0; kp.handle_left.y *= 100.0; kp.handle_right.y *= 100.0
if ad and saved: ad.action = saved
bpy.ops.object.select_all(action='DESELECT'); arm.select_set(True); mesh.select_set(True)
bpy.context.view_layer.objects.active = arm
bpy.ops.export_scene.fbx(filepath=outfile, use_selection=True, object_types={'ARMATURE', 'MESH'},
    add_leaf_bones=False, bake_anim=True, bake_anim_use_all_actions=True, bake_anim_use_nla_strips=False,
    bake_anim_force_startend_keying=True, bake_anim_simplify_factor=0.0,
    apply_scale_options='FBX_SCALE_UNITS', mesh_smooth_type='FACE', path_mode='STRIP')


--- CODE D: work out the real joint frames from the reference pose (Unreal Python) ---
import unreal, json
EAL = unreal.EditorAssetLibrary
SK = "/Game/Characters/Knight/Rigged_v3/SK_Knight_v3"
OUT = r"C:\Work\cape_frames.json"
sk = EAL.load_asset(SK)
pose = unreal.AnimPoseExtensions.get_reference_pose(sk.get_editor_property("skeleton"))
def W(b): return unreal.AnimPoseExtensions.get_bone_pose(pose, b, unreal.AnimPoseSpaces.WORLD)
pairs = []
for k in range(5):
    par = "spine_03"
    for i in range(1, 7):
        b = "cape_B%d_%02d" % (k, i); pairs.append((b, par)); par = b
for k in ("F0", "FL", "FR"):
    par = "pelvis"
    for i in range(1, 5):
        b = "cape_%s_%02d" % (k, i); pairs.append((b, par)); par = b
def d(v): return {"x": v.x, "y": v.y, "z": v.z}
frames = {}
for c, p in pairs:
    tc = W(c); tp = W(p)
    qp = tp.rotation; qc = tc.rotation
    frames[c] = {"parent": p,
                 "pos2": d(qp.unrotate_vector(tc.translation - tp.translation)),
                 "pri2": d(qp.unrotate_vector(qc.get_axis_x())),
                 "sec2": d(qp.unrotate_vector(qc.get_axis_y()))}
json.dump(frames, open(OUT, "w"), indent=1)


--- CODE E: set those frames on each constraint (through the editor's object tools) ---
# FR = the frames from code D; TM = the paths of the PhysicsConstraintTemplate objects in the Physics Asset
for p in TM:
    di = get_properties(p, ['DefaultInstance'])['DefaultInstance']
    c = di['constraintBone1']
    if c not in FR: continue
    f = FR[c]
    di['pos1'] = {'x': 0, 'y': 0, 'z': 0}; di['priAxis1'] = {'x': 1, 'y': 0, 'z': 0}; di['secAxis1'] = {'x': 0, 'y': 1, 'z': 0}
    di['pos2'] = f['pos2']; di['priAxis2'] = f['pri2']; di['secAxis2'] = f['sec2']
    set_properties(p, {'DefaultInstance': di})
  1. PICTURES OF WHAT HAPPENED (attached)

01_Meshy_autorig_cape_glued_to_legs.png - the AI tool’s auto-rig: the cape moves with the legs
02_Cape_hung_from_hips_stretches_between_legs.png - cape moved to the hips: stretches between the legs
03_Try4_bone_physics_standing_bottom_crumples.jpg - TRY 4 in the game, standing: the bottom crumples
04_Try4_bone_physics_walking_tears_and_holes.jpg - TRY 4 in the game, walking: tears, holes, corners fold out
05_Try5_stiff_cape_heel_pokes_through.jpg - TRY 5 stiff cape: whole and smooth, but the heel pokes through

Thank you very much for any help. Plain step-by-step answers for Unreal Engine 5.8 would be best.