Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unfix particles via scripting
#1
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!
Reply