- Home /
How to stop an Interactive Cloth colliding with box collider
I've implemented a netting for a goal which I have eventually got working in a way which I am happy with. However to get the correct reaction I have set the Thickness to 0.55. The problem that this brings is that the net (cloth) collides with the ground, a box collider, and because of the thickness it lies above the ground.
If I could get the net (cloth) to ignore the collision with the ground it would work. But I have tried using Physics.IgnoreCollision
but cannot find the collider for the Interactive Cloth. Is there a way to get Physics.IgnoreCollision
to work? Or any other way I can stop the Interactive Cloth colliding with the box collider?
1.put the box collider and the cloth on 2 different layers 2.Go to edit>Project settings>Physics and select the layers you want physics to ignore no code needed.
Cheers, I'll try that when I get back around to adding the cloth again. A computer restart lost me a week of work. :/
Answer by doogli · Mar 21, 2014 at 04:33 PM
Hi, I'm having a tough time getting my soccer goal netting to work. I have ready everything I can find about cloth collisions and I'm having no joy. My football just goes straight through the cloth. I can't get OnCollisionEnter or OnTriggerEnter to fire for the cloth. The only interaction I can get is using Collision Response, but then the ball sticks to the net and jumps around like a fly in a spider web. I suspect this may be be because the ball in made of Bouncy physic material and there is some feedback happeneing with the ball responding to the net and the net responding again... etc. I'd love to know how you achieved a working cloth net! I have also tried a planar mesh collider, and this worked quite weell, except that the net got all out of shape and wouldn't hang like it should under gravity...