- Home /
The question is answered, right answer was accepted
[Cloth Physics]How is surface penetration achieved in Unity ?
(Well, my previous posts got no reply, feeling kinda frustrated...)
Hi all , I'm now doing my own cloth simulation in Unity, C#.
And I wanted to know how is Unity's built-in cloth(which is from Nvidia) works with surface penetration? I have a skinned cloth and character, surface penetration could avoid the collision detection(even though it's not so expensive for simple primitives). I really don't know how the physics particle is blended with skinned vertices, I've tried several methods, and the result is not as great as Unity's.
You may ask why you need to write your own cloth physics then?
That's because Unity's cloth penetration won't work when I change the character body by scaling the bones(cloth shares the same bone structure with the body). Unity's cloth is in c++, can't get a glimpse. So doing my own cloth I can make things more handleable. Besides I could learn lot of things from it.
So, if anyone happen to know how Unity Cloth handles the surface penetration, Please reply and thanks! This is the last part that I need to take care of for my cloth simulation. (I even made a copy of unity's cloth editor, yeah, it's in c# and decompile-able.)
Please...Hit me with the answer
Thanks for reaching out and helping me! This is an urgency to me.
Yeah, I just wanna achieve the same result here. What I've tried was, 1. let's say we have the skinned vertices(sv[]) and recalculated vertex normals(vn[]), and physics particles(p[]). 2. For a certain i : 0 < i < vertexCount, we have sv[i] and vn[i], which defines a plane[i]. and the particle p[i] should not poke through that plane[i].
That was what I've tried, simple vertex-plane check. And the results are not good.
Hi @YoungXi I personally can't help you with this, since I've never had to use cloth in any of my projects. However, I think you might find more help if you post this question in the Forums.
Follow this Question
Related Questions
Can add a constraint to a cloth at runtime, but can't remove one. 1 Answer
Excluding Vertices from Cloth Colliders in Unity 5 4 Answers
Physics.Simulate and Physics.UpdateCloth spike even though no rigidbodies present 0 Answers
Cloth physics of child game object not working when parent is enabled 1 Answer
Is Cloth component's overhead affordable for mobile MMOs,if added to many characters in scene? 1 Answer