How to fix the collided particle - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html) +--- Thread: How to fix the collided particle (/thread-1072.html) |
How to fix the collided particle - apapaxionga - 10-04-2019 I tried to set the collided particle's invmass to 0 but it explode the softbody. I did it in the following way: Code: void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e) What is the correct way to achieve this ? RE: How to fix the collided particle - josemendez - 11-04-2019 (10-04-2019, 11:43 PM)apapaxionga Wrote: I tried to set the collided particle's invmass to 0 but it explode the softbody. I did it in the following way: When changing the mass of softbody particles in the solver, you have to recalculate shape matching centers of mass. Like this: Code: foreach (ObiShapeMatchingConstraintBatch batch in softbody.ShapeMatchingConstraints.GetBatches()) This is done automatically when you call PushDataToSolver() on a softbody, but not if you modify solver properties directly. |