Cloth physics not interacting with world physics objects.

Hi, I’m trying to create curtains that react to objects being thrown at them or any other physics items touching them such as geometry collections.

I have changed the curtains clothing to ‘Collide with Environment’ This makes it collide properly with static meshes but I can’t get it working with physics objects in the scene. Any ideas?

1 Like

Make sure the collision channels are correct.

Also, normally you don’t make cloth work that way

If you have to interact with animated meshes you make an animated mesh for the cloth to be in, then paint the cloth lightly (a distance of 5 tops) and set up anymdinamics or a similar link for the skeletal chain to react.

Yes, it is limited by the skeleton - that is the point. Calculating every vertex for collision vs calculating a few bones is a lot of practical difference in performance…

Ah I see thanks. I will go about doing it the correct way with bones then once I figure out why this isn’t working.

By channels do you mean the Collision Presets “Ignore Overlap Block” matrix? If so, I believe it is all correct. Both the cloth and the cube are set to block everything.

These are the values of the physics cube:

Here is the value of the physics cloth:

And here are the values of the physics cloth asset:

I found out this works if I change the physics cube actor ‘Object Type’ in ‘Collision Preset’ to ‘World Static’. However, this is bad practice, so I want to find the cause of this issue.

I tried setting up new collision presets in the project settings. However, I still cannot get the cloth and the cube to interact I see no reason why they shouldn’t.

Screenshot of my project settings: (Note: Collision response is something I am unable to save changes to maybe this is the cause? If I select ‘Block’ then hit accept, go back into the preset nothing is saved.)

My physics cloth actor collision setting:

My physics cube actor collision settings: (Note: I put an arrow to the field that if I change to world static everything works.)

You got what I meant on the last post.

As far as why, I think it may be a Chaos limitation.

First of chaos is bad. Particularly compared to nvidia physX. So it’s a huge limiting factor.

Secondly, nvidia doesn’t even allow interaction with world static. Because it’s bad practice (or well, it was 20 years ago when nvCloth was made, stuff just couldn’t run at the time plus calculate the collisions).

Within the cloth settings (for chaos), you may be able to find other… things that work. Switches, similar to what you already found detailing what channels the material responds to.

If you need to react to “just a cube" well then think of it this way.

Make the curtain a skeletal mesh. Give it a bone to signify the object (a cube character?). Import as SKM (which being cloth it already is?) , then, Make extra sure a UCB the same size as the cube is be part of the PHAT asset on the bone you specifically added.

With that setup, add a trigger to the curtain bluprint as a large box collision. When the cube enters the collision, cast to the curtain SKM (or pull a reference) and set the position of the bone you created to match the cube position.

At that point the cube has a virtual self contained collision that moves inside the SKM which the cloth is forced to respond to.

This also works for invidia because it only allows for self collision.

If you are dealing with just a cube, or a sphere. Then that’s one way to do it that 100% works.

Complex stuff goes back to not being easy. Also has diminishing returns… moving one hull attached to a single bone is straightforward. Mirroring an animation (say of a biped) to a skeleton contained inside the curtain - not so much… (but it did work, and it did look cool even if at 20fps…)

1 Like

Okay I’ll just chalk this up to a Chaos limitation/bug then.

For my actual in game curtains, I am using a skeletal mesh approach. This was more just about trying to understand why this chaos cloth didn’t work.

However, I’m still having a few issues with the skeletal mesh approach.

Bones ‘Bunching Up’ when physics is applied. - Development / Character & Animation - Epic Developer Community Forums