Obi Official Forum
Help Cloth position - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Help Cloth position (/thread-2463.html)



Cloth position - yeyoya - 03-09-2020

Hello,

Is it possible to get the cloth position within the solver?
I'm spawning flying balloons and I would like to know their position.

Many thanks,

Oliver


RE: Cloth position - josemendez - 03-09-2020

(03-09-2020, 12:06 PM)yeyoya Wrote: Hello,

Is it possible to get the cloth position within the solver?
I'm spawning flying balloons and I would like to know their position.

Many thanks,

Oliver

There's no uniquely defined "position" for a deformable object, like there is for a rigid object. It just does not make sense, as the object can stretch/squash/fold/tear into pieces, etc.

Best you can do is get its center of mass, you can use cloth.GetMass(out Vector3 com) for this.

cheers,


RE: Cloth position - yeyoya - 03-09-2020

(03-09-2020, 12:22 PM)josemendez Wrote: There's no uniquely defined "position" for a deformable object, like there is for a rigid object. It just does not make sense, as the object can stretch/squash/fold/tear into pieces, etc.

Best you can do is get its center of mass, you can use cloth.GetMass(out Vector3 com) for this.

cheers,

Thank you very much Jose!!
This what I was looking for!!