From 76af5fb50d303e96ead71fa63eaf71aa49a5ee4e Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sat, 2 Jun 2012 22:01:04 +0000 Subject: [PATCH] Cloth collisions: Revert 47335. --- source/blender/blenkernel/intern/collision.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 4911ca46018..ddb01875767 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -337,9 +337,10 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM float d = clmd->coll_parms->epsilon*8.0f/9.0f + epsilon2*8.0f/9.0f - collpair->distance; if ( d > ALMOST_ZERO) { // stay on the safe side and clamp repulse - float repulse = d; + float repulse = d*1.0f/spf; + + float impulse = repulse / ( 3.0 * ( 1.0f + w1*w1 + w2*w2 + w3*w3 )); // original 2.0 / 0.25 - float impulse = repulse / (( 1.0f + w1*w1 + w2*w2 + w3*w3 )); // original 2.0 / 0.25 VECADDMUL ( i1, collpair->normal, impulse ); VECADDMUL ( i2, collpair->normal, impulse ); VECADDMUL ( i3, collpair->normal, impulse );