# Tutorial: Cloth Collision with World

**URL:** <https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636>\
**Category:** Tutorial & Course Discussions\
**Tags:** unreal-engine\
**Created:** [June 8, 2022, 2:30am UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636 "2022-06-08T02:30:32Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![gozerKeymaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gozerKeymaster](https://forums.unrealengine.com/u/gozerKeymaster)\
**Post date:** [June 8, 2022, 2:30am UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/1 "2022-06-08T02:30:32Z")

</div>

In the past, colliding cloth simulation with world objects has been difficult to accomplish. We’ve tried to amend that issue in Chaos cloth for UE 5.0 by making cloth simulation and world mesh collisions easier to create.  
  
[https://dev.epicgames.com/community/learning/tutorials/p4a1/unreal-engine-cloth-collision-with-world](https://dev.epicgames.com/community/learning/tutorials/p4a1/unreal-engine-cloth-collision-with-world)

---

<div class="post-metadata">

**Author:** ![alinamuneer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alinamuneer](https://forums.unrealengine.com/u/alinamuneer)\
**Post date:** [June 27, 2022, 12:00pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/2 "2022-06-27T12:00:16Z")

</div>

This is a perfect tutorial, although i have a few questions.

1. Can I do this with UE4 (previous version) or this is only available in UE5?
2. I don’t know how to make the cloth hang on the hanger and not collide with the hanger while it moves, do I import this as a joint mesh from Blender and add custom collision to the hanger?

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [June 27, 2022, 1:39pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/3 "2022-06-27T13:39:16Z")

</div>

PRE - chaos, using PhysX this could only be done by SkeletalMesh collision.  
Your cloth item would need to have bones and colliders assigned, with a very light value assigned to cloth simulation so that it would respect the skeletal mesh deformation.

Post chaos, in 4.27 (custom chaos build), the chaos cloth world collision never worked right (engine crashes) up to 6 months ago.  
While I hope that it was patched and works, my experience with unreal is: don’t hold your breath.

Regarding the hanger question. The shirt and the hanger are probably a single item. the cloth value on the hanger is probably derived from vertex paint.  
Probably still use my plug in for it:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/8/768e2b4ca9800d023c316fd65287442fd041f9ed.jpeg "BoneBreaker v-4 0 - NVCloth Visualizer + creating a garment from scratch.") ](https://www.youtube.com/watch?v=69fjZUP70q4)

---

<div class="post-metadata">

**Author:** ![gozerKeymaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gozerKeymaster](https://forums.unrealengine.com/u/gozerKeymaster)\
**Post date:** [June 27, 2022, 2:41pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/4 "2022-06-27T14:41:33Z")

</div>

Yes, this is only available in UE5 (Chaos). The hanger is basically a simple physics asset with two tapered capsules for collisions. That, coupled with Max distance painting and falloff seemed to work for this example. It’s quick and rough, but does the job.

 ![Cloth_Shirt_Tapered_Capsules](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/f/e0f9165a4b3a3c169ce63c801c485535793ee7e2.jpeg)

---

<div class="post-metadata">

**Author:** ![alinamuneer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alinamuneer](https://forums.unrealengine.com/u/alinamuneer)\
**Post date:** [July 1, 2022, 3:36pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/5 "2022-07-01T15:36:29Z")

</div>

Thanks a lot, I’ll see if i need UE5 as your hanged cloth in the tutorial looks super cool.  
I just ended up doing some work around, created a mesh in Blender while the shirt was falling as one arm was held by a collision object (cylinder) and inverted that falling shirt into a mesh and in a new blender file joined it with a hanger and now the shirt is only half hung on the hanger (as i desired), now using the wind and gravity in UE4, looks fine.

But still as you can see material looks unsmoothed, is it possible to access your cloth material and texture from the tutorial?

 ![halfHung_shirt_RED](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/2/2b2cf912df610c4d0a1b49a3c5f95d4e7296c862.jpeg)

---

<div class="post-metadata">

**Author:** ![Servus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Servus](https://forums.unrealengine.com/u/Servus)\
**Post date:** [July 16, 2022, 6:58pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/6 "2022-07-16T18:58:01Z")

</div>

I’ve been following this and several other tutorials when trying to create a sort of curtain that flows in the wind. I think there’s a known issue with wind not affecting some cloth stuff but the big problem I have at the moment is that my curtains have no idea how to collide with the environment. I can’t seem to find out how to tell my cloth how to collide with the environment.

---

<div class="post-metadata">

**Author:** ![gozerKeymaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gozerKeymaster](https://forums.unrealengine.com/u/gozerKeymaster)\
**Post date:** [July 18, 2022, 1:46pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/7 "2022-07-18T13:46:12Z")

</div>

World Collision is a Chaos Cloth 5.0 update. This is not a feature of 4.27 NvCloth, just FYI. If you are still having issues with collisions, make sure your Chaos Cloth iterations are set high enough. Experiment with subdivision settings, too. Increasing both will have a hit to perf, but if I’m ever having issues with any collisions I will bump those settings up first.

Since I’m not aware of your particular cloth setup, are you trying to move objects through your curtains or have curtains collide with a wall, etc? If it’s a wall, I’d use PhysicsAsset collisions as part of the curtain skeletalMesh. If it’s objects moving through the curtains, I’d first try the iterations/subdivisions increase I mentioned above.

---

<div class="post-metadata">

**Author:** ![Servus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Servus](https://forums.unrealengine.com/u/Servus)\
**Post date:** [July 18, 2022, 11:02pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/8 "2022-07-18T23:02:45Z")

</div>

I did fix the issue with the cloth not being affected by wind. If I had to guess, my skeletal mesh is missing something that it needs in order to tell it to collide with the world.

Here’s a brief demo of the issue: [UE5 Cloth Collision Issue - YouTube](https://youtu.be/pOuq7eu4DBs)

---

<div class="post-metadata">

**Author:** ![GarielSd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GarielSd](https://forums.unrealengine.com/u/GarielSd)\
**Post date:** [September 6, 2022, 4:45pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/10 "2022-09-06T16:45:44Z")

</div>

This works fine. But, I have one skeletal mesh with clothes and the clothes collides fine with its own physic body and with static objects. But as soon as I walk close enough to another skeletal mesh with the same settings, the engine crash. It doesn’t matter how many bodies the physic body has, it will crash.

To check this, grab the default third person project, add a painted cloth to it, and put two instances in the scene with collide with environment enabled, possess one of them and walk in the direction of the other.

---

<div class="post-metadata">

**Author:** ![gozerKeymaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gozerKeymaster](https://forums.unrealengine.com/u/gozerKeymaster)\
**Post date:** [September 6, 2022, 5:24pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/11 "2022-09-06T17:24:52Z")

</div>

Thank you for the reproducible steps. I’ve alerted the engineer and we’ll investigate from our end.

---

<div class="post-metadata">

**Author:** ![GarielSd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GarielSd](https://forums.unrealengine.com/u/GarielSd)\
**Post date:** [September 6, 2022, 11:55pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/12 "2022-09-06T23:55:47Z")

</div>

Thanks. This crash happens from time to time.

It will happens every single time if one of them is an active ragdoll (with an UPhysicalAnimationComponent)

```auto
        PhysAnim->SetSkeletalMeshComponent(Mesh);

        FPhysicalAnimationData Data;
        Data.bIsLocalSimulation = false;
        Data.OrientationStrength = 500.f;
        Data.AngularVelocityStrength = 100.f;
        Data.PositionStrength = 500.f;
        Data.VelocityStrength = 100.f;
        Data.MaxLinearForce = 0.f;
        Data.MaxAngularForce = 0.f;
        PhysAnim->ApplyPhysicalAnimationSettingsBelow(RootBone, Data, false);

        Mesh->SetAllBodiesBelowSimulatePhysics(RootBone, true, false);
        Mesh->SetAllBodiesBelowPhysicsBlendWeight(RootBone, 1.0f, false, false);

        this->CapsuleComponent->SetCollisionEnabled(ECollisionEnabled::NoCollision);

```

To prevent the pawn from falling and keep it standing, I add a sphere to the root of the default third person physic body as kinematic and without collision. And with a free constraint to the hip. So the RootBone above is the “root” bone.

---

<div class="post-metadata">

**Author:** ![chutoi44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chutoi44](https://forums.unrealengine.com/u/chutoi44)\
**Post date:** [November 3, 2022, 2:10am UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/13 "2022-11-03T02:10:29Z")

</div>

Hi, great tutorial, thanks for sharing!

---

<div class="post-metadata">

**Author:** ![s54780478](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@s54780478](https://forums.unrealengine.com/u/s54780478)\
**Post date:** [January 12, 2023, 1:42pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/14 "2023-01-12T13:42:40Z")

</div>

Thanks I was stuck for a week on this hope the engine will fix this bug in the future

---

<div class="post-metadata">

**Author:** ![RobMeade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RobMeade](https://forums.unrealengine.com/u/RobMeade)\
**Post date:** [March 6, 2023, 4:28pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/15 "2023-03-06T16:28:29Z")

</div>

Hey @gozerKeymaster,

I’m using 5.0.3, trying to make a “flag” using this, and ticking those two options crashes the editor. In fact, I think its the “Collide with Environment” that’s the issue, I can tick that, press play, engine crash with this error message:

Assertion failed: PointFaces[PointIndex].Num() \>= 3 [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp] [Line: 3300]

0x00007ff9f53eacfa UnrealEditor-Engine.dll!\<lambda\_94c16a66f41228cab5c606b59cbfab6c\>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp:3300]  
0x00007ff9f53e96ab UnrealEditor-Engine.dll!\<lambda\_5d6cc08329c3d8c27192ef069b21fd2e\>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp:3411]  
0x00007ff9f5083c49 UnrealEditor-Engine.dll!FPhysInterface\_Chaos::ExecuteRead() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\Experimental\PhysInterface\_Chaos.cpp:682]  
0x00007ff9f541b593 UnrealEditor-Engine.dll!USkeletalMeshComponent::ProcessClothCollisionWithEnvironment() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp:3482]  
0x00007ff9f5432420 UnrealEditor-Engine.dll!USkeletalMeshComponent::UpdateClothTransformImp() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp:3634]  
0x00007ff9f4180e3e UnrealEditor-Engine.dll!USkeletalMeshComponent::UpdateClothSimulationContext() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp:2150]  
0x00007ff9f543206b UnrealEditor-Engine.dll!USkeletalMeshComponent::UpdateClothStateAndSimulate() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp:3894]  
0x00007ff9f543097e UnrealEditor-Engine.dll!USkeletalMeshComponent::TickClothing() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp:3952]  
0x00007ff9f5397cd0 UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTickHelper\<\<lambda\_c41e2d2f951e9ab3b5096deedcdc912f\> \>() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Classes\GameFramework\Actor.h:3931]  
0x00007ff9f5402fba UnrealEditor-Engine.dll!FSkeletalMeshComponentClothTickFunction::ExecuteTick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshComponentPhysics.cpp:101]  
0x00007ff9f5665a0f UnrealEditor-Engine.dll!FTickFunctionTask::DoTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:284]  
0x00007ff9f566ccf8 UnrealEditor-Engine.dll!TGraphTask::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:975]  
0x00007ffa98973a9d UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:753]  
0x00007ffa98973f3e UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:642]  
0x00007ffa9897d6af UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2169]  
0x00007ff9f5682f0a UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:565]  
0x00007ff9f56898b0 UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1592]  
0x00007ff9f46cf08f UnrealEditor-Engine.dll!UWorld::RunTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:790]  
0x00007ff9f46d79c0 UnrealEditor-Engine.dll!UWorld::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1531]  
0x00007ffa9398e5f5 UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1777]  
0x00007ffa9431aac6 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:474]  
0x00007ff7187182f6 UnrealEditor.exe!FEngineLoop::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5215]  
0x00007ff718730d9c UnrealEditor.exe!GuardedMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:183]  
0x00007ff718730e8a UnrealEditor.exe!GuardedMainWrapper() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]  
0x00007ff718733c4d UnrealEditor.exe!LaunchWindowsStartup() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]  
0x00007ff718745564 UnrealEditor.exe!WinMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]  
0x00007ff718748736 UnrealEditor.exe!\_\_scrt\_common\_main\_seh() [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe\_common.inl:288]  
0x00007ffae7d17614 KERNEL32.DLL!UnknownFunction []  
0x00007ffae92c26a1 ntdll.dll!UnknownFunction []

I’ll be honest, I have no idea what the issue is, so haven’t been able to resolve it myself.

Any info would be appreciated. 🙂

---

<div class="post-metadata">

**Author:** ![adjnor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@adjnor](https://forums.unrealengine.com/u/adjnor)\
**Post date:** [October 17, 2023, 4:11am UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/16 "2023-10-17T04:11:59Z")

</div>

I keep getting the same error, would gladly appreciate some help.

EDIT: Think I figured out the issue, see here:

> [@Assertion failed: PointFaces\[PointIndex\].Num() \>= 3 \[File:D:\\build\\++UE5\\Sync\\Engine\\Source\\Runtime\\Engine\\Private\\SkeletalMeshComponentPhysics.cpp\] \[Line: 3181\]](https://forums.unrealengine.com/t/assertion-failed-pointfaces-pointindex-num-3-file-build-ue5-sync-engine-source-runtime-engine-private-skeletalmeshcomponentphysics-cpp-line-3181/1220899/4):
>
> After a lot of experimentation I think I figured out the issue. I had a mesh with a corner (wall corner mesh, 90° angle) using auto convex collision. This kept making the editor crash when the cloth would come in contact with it. The simple fix was to manually add box colliders to replace the convex collision of the corner mesh. I also had some other meshes which caused issues such as those using complex as simple. When in doubt try simplifying complex collisions for simpler ones as the poster a…

---

<div class="post-metadata">

**Author:** ![the\_combative](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@the\_combative](https://forums.unrealengine.com/u/the_combative)\
**Post date:** [July 17, 2024, 2:41pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/17 "2024-07-17T14:41:33Z")

</div>

Same problem here, any update or solutions? 😢

 ![Screenshot_136](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/7/a8776fbff5dfac239013e8b37d89b58be271ca80.jpeg)  
Clothing is colliding with the sphere but not with the ground/floor/planes, I tried a lot of options…

Thanks!

---

<div class="post-metadata">

**Author:** ![Goatta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Goatta](https://forums.unrealengine.com/u/Goatta)\
**Post date:** [July 30, 2024, 3:36pm UTC](https://forums.unrealengine.com/t/tutorial-cloth-collision-with-world/576636/18 "2024-07-30T15:36:41Z")

</div>

hey any tutorials about this for ue4 would be great?
