rust/hwphysics/src/grid.rs
changeset 15273 bfd185ad03e7
parent 15263 24828281c9c5
child 15274 42b710b0f883
--- 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),
                         )
                     }
                 }