# HG changeset patch # User alfadur # Date 1564081160 -10800 # Node ID bfd185ad03e7602e7e31cc7f9108d0b59772a588 # Parent 3053d07a78401ef4943ceceaadd252313fde2a50 use better contact point for inter-gear collision diff -r 3053d07a7840 -r bfd185ad03e7 rust/hwphysics/src/grid.rs --- a/rust/hwphysics/src/grid.rs Thu Jul 25 19:40:40 2019 +0200 +++ b/rust/hwphysics/src/grid.rs Thu Jul 25 21:59:20 2019 +0300 @@ -120,7 +120,7 @@ collisions.push( bin.dynamic_refs[index], Some(bin.dynamic_refs[other_index]), - &bounds.center, + &((bounds.center + other.center) / 2), ) } } @@ -130,7 +130,7 @@ collisions.push( bin.dynamic_refs[index], Some(bin.static_refs[other_index]), - &bounds.center, + &((bounds.center + other.center) / 2), ) } }