# Weapon and cloth collision

**URL:** <https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232>\
**Category:** UDK Programming and UnrealScript\
**Tags:** unreal-engine\
**Created:** [February 23, 2016, 1:19pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232 "2016-02-23T13:19:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chimera201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chimera201](https://forums.unrealengine.com/u/chimera201)\
**Post date:** [February 23, 2016, 1:19pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232/1 "2016-02-23T13:19:54Z")

</div>

I have a pawn that extends UDKPawn and it interacts properly with a cloth skeletal mesh. Now there is a melee weapon attached to the pawn but it doesn’t collide with the cloth. The weapon has a physics asset but it still doesn’t interact with the cloth. Maybe I am missing some flag or something or is it like an attached mesh won’t collide with cloth or something?

---

<div class="post-metadata">

**Author:** ![w\_jones](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@w\_jones](https://forums.unrealengine.com/u/w_jones)\
**Post date:** [February 29, 2016, 7:47pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232/2 "2016-02-29T19:47:09Z")

</div>

The weapon needs to have collision shapes added to it like you did with the cloth.

---

<div class="post-metadata">

**Author:** ![chimera201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chimera201](https://forums.unrealengine.com/u/chimera201)\
**Post date:** [March 1, 2016, 1:04pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232/3 "2016-03-01T13:04:09Z")

</div>

> [@w\_jones;483986](#):
>
> The weapon needs to have collision shapes added to it like you did with the cloth.

Already said the weapon has a physics asset and is perfectly there with the ‘show collision’ command but doesn’t work. If I put the weapon mesh directly in the level it perfectly collides with the cloth. It must be something related to getting attached. I actually worked around applying impulse to the cloth in code with a line trace.

---

<div class="post-metadata">

**Author:** ![w\_jones](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@w\_jones](https://forums.unrealengine.com/u/w_jones)\
**Post date:** [March 7, 2016, 3:56pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232/4 "2016-03-07T15:56:00Z")

</div>

Chimera, to clarify, physics assets are not collision volumes that cloth can collide with.

Cloth can only collide with collision volumes defined when you create the mesh in the editor (3ds max or maya). Cloth can’t collide with physics asset shapes.

Currently I can only get cloth to collide with collision volumes in the main mesh of the character, not meshes added or attached.

---

<div class="post-metadata">

**Author:** ![chimera201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chimera201](https://forums.unrealengine.com/u/chimera201)\
**Post date:** [March 8, 2016, 1:40pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232/5 "2016-03-08T13:40:30Z")

</div>

> [@w\_jones;488480](#):
>
> Currently I can only get cloth to collide with collision volumes in the main mesh of the character, not meshes added or attached.

Exactly.

I think the collision volumes u are referring to is the physics asset itself. The other collision volume I can think of is the primitive cylindrical component that u specify as a collision volume for the pawn and AI. That volume isn’t good for this kind of collision. And the cloth does collide with the physics asset. It does not when its attached to something else.

Alternatively if I remove the physics asset of a standalone mesh then it goes through. So it confirms that the cloth does collide(intended collision) with the physics asset if it is standalone.

---

<div class="post-metadata">

**Author:** ![w\_jones](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@w\_jones](https://forums.unrealengine.com/u/w_jones)\
**Post date:** [March 9, 2016, 3:41pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232/6 "2016-03-09T15:41:46Z")

</div>

Chimera

I have got it working ! The secret is to add any additional meshes to the mesh that contains the cloth NOT the main mesh, also you need enable collision in both the attached mesh and the cloth mesh.

Let me know how you get on

W Jones

---

<div class="post-metadata">

**Author:** ![chimera201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chimera201](https://forums.unrealengine.com/u/chimera201)\
**Post date:** [March 9, 2016, 4:16pm UTC](https://forums.unrealengine.com/t/weapon-and-cloth-collision/56232/7 "2016-03-09T16:16:42Z")

</div>

How is that going to be useful? I wanted the collision to work on the weapon that’s attached to the player character pawn. I’m actually going ahead with applying impulse through line trace.
