Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unfix cloth on runtime
#1
Hello, another question. 
I have my cloth that has some particles fixed through unity editor -> Particle editor . But at some point in the game i need to set all of these particles as unfixed. As is possible in the editor. Or in general.. how to acess all particle parameters (and possibly change them) on runtime (mass, radius, fix/unfix, phase, etc..) ?
Reply
#2
(25-02-2018, 04:06 PM)domkonecny Wrote: Hello, another question. 
I have my cloth that has some particles fixed through unity editor -> Particle editor . But at some point in the game i need to set all of these particles as unfixed. As is possible in the editor. Or in general.. how to acess all particle parameters (and possibly change them) on runtime (mass, radius, fix/unfix, phase, etc..) ?

Hi there,

This is all covered in the docs:
http://obi.virtualmethodstudio.com/tutor...icles.html

To unfix a particle, simply set its inverse mass to something larger than 0. To fix it again, set the inverse mass to 0 (since 1/0 = infinity, by doing this you're giving it infinite mass and preventing it from moving).

cheers!
Reply