diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-11-26 11:37:58 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-11-26 11:40:59 +0100 |
| commit | f293dc602451ddf3c13ce6272f9d3556d47f4fca (patch) | |
| tree | 9a3f8e2300e673a8581e782890bbc3776103e833 /src/geometry | |
| parent | 7541108746191b0a65765f8a6c225113ef5f3b43 (diff) | |
| download | rapier-f293dc602451ddf3c13ce6272f9d3556d47f4fca.tar.gz rapier-f293dc602451ddf3c13ce6272f9d3556d47f4fca.tar.bz2 rapier-f293dc602451ddf3c13ce6272f9d3556d47f4fca.zip | |
Fix bogus collider removal in the broad-phase.
Diffstat (limited to 'src/geometry')
| -rw-r--r-- | src/geometry/broad_phase_multi_sap.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/geometry/broad_phase_multi_sap.rs b/src/geometry/broad_phase_multi_sap.rs index d3a0d5a..cd55f8b 100644 --- a/src/geometry/broad_phase_multi_sap.rs +++ b/src/geometry/broad_phase_multi_sap.rs @@ -586,9 +586,6 @@ impl BroadPhase { let proxy = &mut self.proxies[proxy_index]; - // Push the proxy to infinity, but not beyond the sentinels. - proxy.aabb.mins.coords.fill(SENTINEL_VALUE / 2.0); - proxy.aabb.maxs.coords.fill(SENTINEL_VALUE / 2.0); // Discretize the AABB to find the regions that need to be invalidated. let start = point_key(proxy.aabb.mins); let end = point_key(proxy.aabb.maxs); @@ -615,6 +612,9 @@ impl BroadPhase { } } + // Push the proxy to infinity, but not beyond the sentinels. + proxy.aabb.mins.coords.fill(SENTINEL_VALUE / 2.0); + proxy.aabb.maxs.coords.fill(SENTINEL_VALUE / 2.0); self.proxies.remove(proxy_index); } |
