07-10-2019, 10:33 AM
(07-10-2019, 09:23 AM)josemendez Wrote: Hi there,
You're just changing the actor's data (which is the data serialized with the actor, copied over to the solver when you press "play"), but not solver data. While you can read data from actor.invMasses/positions/velocities/whatever to retrieve rest-pose values, writing to them does not have any effect at runtime. You need to set solver.invMasses instead. Also no need to call UpdateActiveParticles(), as you're not activating/deactivating particles, just setting their mass. Take a look at:
http://obi.virtualmethodstudio.com/tutor...icles.html
Thank you very much Jose! After changing it to solver.invMasses, it is working well.
May I know if it is possible to know the position of particles in the index, or some other way of selection, so as to choose some particles to be left fixed?