Obi Official Forum
Unfix particles via scripting - 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: Unfix particles via scripting (/thread-225.html)



Unfix particles via scripting - mbbmbbmm - 04-11-2017

Ok, so in order to fix a particle and make it move with the transform i should set the inverse Mass of the particle to zero (making the mass infinite I think). This works nicely. But how do I achieve the opposite, how can I unfix the particle again?  
If I give it back it's cached inverse mass it doesn't do anything - it doesn't react to gravity etc...

Ah nevermind I got it! 
actor.PushDataToSolver(ParticleData.INV_MASSES);  
was required.  Gran sonrisa Interesante


One more question. When I set up the cloth, i set the mass for all particles to 0.1. Shouldn't the inverse masses all be 10? Because when I cache them they have different values, some have 4760.332, some have  14281, some have 9520.665... What i s going on there?
Thank you!