29-03-2021, 10:07 AM
(This post was last modified: 29-03-2021, 10:09 AM by josemendez.)
(29-03-2021, 05:01 AM)fewerhy Wrote: I would like to know whether it is possible to modify the parameters of shape matching constraint for a softbody during runtime. For example, if I want to change the goal position for each particle.
"Goal position" is not a parameter of shape matching. This is calculated at runtime as center of mass of the current cluster at rest, you can't change it (except by tinkering with particle masses, as that will move the center of mass around).
All exposed parameters can be changed at runtime, though:
Code:
softbody.shapeMatchingConstraintsEnabled = <value>;
softbody.deformationResistance = <value>;
softbody.maxDeformation = <value>;
softbody.plasticCreep = <value>;
softbody.plasticRecovery= <value>;
softbody.plasticYield = <value>;