Obi Official Forum
Help Could ObiSkinnedCloth reset all particles to skinned positions? - 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 Could ObiSkinnedCloth reset all particles to skinned positions? (/thread-2660.html)



Could ObiSkinnedCloth reset all particles to skinned positions? - asimofu_ok - 23-12-2020

Hi, I use ObiSkinnedCloth to a character's cloth.
 I want to reset the cloth anytime.
But I didn't find any way to reset particles to skinned positions.

I tried to use ObiActor.ResetParticles() and to set Solver.restPositions to Solver.positions.
But cloth particles set just to first T-Pose positions.


RE: Could ObiSkinnedCloth reset all particles to skinned positions? - josemendez - 23-12-2020

(23-12-2020, 01:39 PM)asimofu_ok Wrote: Hi, I use ObiSkinnedCloth to a character's cloth.
 I want to reset the cloth anytime.
But I didn't find any way to reset particles to skinned positions.

I tried to use ObiActor.ResetParticles() and to set Solver.restPositions to Solver.positions.
But cloth particles set just to first T-Pose positions.

You should set solver.positions to the values returned by Unity's BakeMesh function, or alternatively,  set the "skin radius" of all skin constraints to zero. See: http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html


RE: Could ObiSkinnedCloth reset all particles to skinned positions? - asimofu_ok - 24-12-2020

I see. Thank you for replying.

I use Unity 2019.2 and Obi 5.3.
I think I must use Mesh baking.