diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-06-03 02:01:04 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-06-03 02:01:04 +0400 |
commit | 76af5fb50d303e96ead71fa63eaf71aa49a5ee4e (patch) | |
tree | 7a7e03c4f0af80e777b291bc9e0842ede7639345 /source | |
parent | 014105f35d0d3bd0adae79c15f12e6e2e7c2e5b4 (diff) |
Cloth collisions: Revert 47335.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/collision.c | 5 |
1 files 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 ); |