06-11-2022, 08:45 PM
(This post was last modified: 06-11-2022, 08:48 PM by Zombie1111.)
Im trying to change the distance iterations option at runtime using a script but I cant get it to work!
Doing this does nothing
grab_holdingRope.solver.distanceConstraintParameters.iterations = 20;
grab_holdingRope.UpdateParticleProperties();
Doing this causes the rope to "drag itself" and fly around all over the place. (Calling both UpdateParticleProperties and UpdateBackend have the same effect)
grab_holdingRope.solver.distanceConstraintParameters.iterations = 20;
grab_holdingRope.solver.UpdateBackend();
Changing the distance iterations option at runtime using the inspector does work! So I guess there is a function or something that I must call after changing the option!? But idk what that function is called and I have tried calling many different functions with no luck.
Doing this does nothing
grab_holdingRope.solver.distanceConstraintParameters.iterations = 20;
grab_holdingRope.UpdateParticleProperties();
Doing this causes the rope to "drag itself" and fly around all over the place. (Calling both UpdateParticleProperties and UpdateBackend have the same effect)
grab_holdingRope.solver.distanceConstraintParameters.iterations = 20;
grab_holdingRope.solver.UpdateBackend();
Changing the distance iterations option at runtime using the inspector does work! So I guess there is a function or something that I must call after changing the option!? But idk what that function is called and I have tried calling many different functions with no luck.