Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Prevent object from going through cloth
We are working on a project, where we shoot a rigidbody spherical object onto an Obi cloth object.
Sometimes the object collides well with the cloth object but many time it just passes through.

I read about how the interaction works by the use of the physics material so I changed some values
which made it better looking results but I am still getting it to pass through the cloth object.

How can I totally prevent the rigidbody from doing that?
Or if I can't, how can I get the OnObjectCollision method for either the rigidbody or the cloth
so I can reduce the velocity of the rigidbody.
I tried doing that via the 'CollisionEventHandler' class but it keeps on printing everytime the solver and not
the interacting object.

Just reduce the mass of your rigidbody (or, increase the mass of your cloth particles. you can do both things.) Objects that are very heavy -in comparison to the cloth particles- will impart a lot of force upon collision. This separates particles in the cloth very easily and opening holes in the particle representation, trough which they can slip.

You can also increase the amount of distance constraint iterations in your solver, this will make the cloth more resistant to stretching.