14-07-2023, 07:54 AM
(This post was last modified: 14-07-2023, 08:00 AM by josemendez.)
(14-07-2023, 07:40 AM)danazoid Wrote: Thanks for the quick reply.
May I ask how the force from the cloth is actually calculated?
You can see for yourself in BurstColliderCollisionConstraintsBatch.cs. There, a position delta is calculated for both the particle and the rigidbody involved in each contact (roughly, lines 277-282). It is then converted to an impulse and applied to the rigidbody using BurstMath.ApplyImpulse().
The basic formula is your typical PBD constraint:
Code:
lambda = constraint * (massA + massB);
deltaA = lambda * gradient / massA;
deltaB = lambda * gradient / massB;
(14-07-2023, 07:40 AM)danazoid Wrote: Because I get this unexpected result: when my tool mass is small, it is easily pulled through the cloth. When the tool mass is large, the cloth can resist the tool better. I can record a video to show you.
That doesn't make sense, should be the exact opposite. Could you share a video of this, or describe a way to set things up in a way that reproduces this?
(14-07-2023, 07:40 AM)danazoid Wrote: Yes it is a rigidbody.
To clarify, by cloth mass do you mean:
1) entire cloth mass
2) total mass of particles of cloth that contact object
3) mass of each particle that contacts object
Each particle collides against the cloth individually (think of each particle as an individual "rigidbody") so I mean single cloth particle mass vs contact object mass.
(14-07-2023, 07:40 AM)danazoid Wrote: Additional question: sometimes, the cloth particles move but the cloth rendered mesh doesn't. What might be the cause?
That should not be the case, mesh vertex positions are directly copied from particle positions. Can you share a video of this?