dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.77k stars 235 forks source link

proxy.aabb.maxs >= min_bound 7683905000 #580

Closed hakolao closed 5 months ago

hakolao commented 5 months ago
thread '<unnamed>' panicked at src\index.crates.io-6f17d22bba15001f\rapier2d-0.17.2\src\geometry\broad_phase_multi_sap\sap_axis.rs:61:13:
proxy.aabb.maxs 7683904500 (in Aabb { mins: [-10737418000.0, 7683904500.0], maxs: [-10737418000.0, 7683904500.0] }) >= min_bound 7683905000

proxy.aabb.maxs 7683904500 (in Aabb { mins: [-10737418000.0, 7683904500.0], maxs: [-10737418000.0, 7683904500.0] }) >= min_bound 7683905000

Getting this error. I have no clue why the numbers are what they are.

Any collider in my scene has aabbs like:

new (update) collider aabb Aabb { mins: [-0.8203125, -1.5234375], maxs: [0.80078125, 1.5039063] }
new (update) collider aabb Aabb { mins: [-0.078125, -0.068359375], maxs: [0.05859375, 0.048828125] }
new (update) collider aabb Aabb { mins: [-0.078125, -0.068359375], maxs: [0.05859375, 0.048828125] }
new (update) collider aabb Aabb { mins: [-0.8203125, -1.4550781], maxs: [0.80078125, 1.4355469] }
new (update) collider aabb Aabb { mins: [-0.8203125, -1.4453125], maxs: [0.80078125, 1.4257813] }
hakolao commented 5 months ago

Looks like the rb position is very large. No idea why.. yet.

Isometry {
Translation {

  ┌                          ┐
  │ -5461684373000552448.000 │
  │  4570956259443867648.000 │
  └                          ┘
hakolao commented 5 months ago

Might be related to me updating colliders...

hakolao commented 5 months ago

Might also be me applying impulse from another thread while updating colliders... Pretty sure it is this.

Mass is sometimes too small, and my impulse causes numbers to skyrocket. And the mass is too small, because I apply impulse on an rb that sometimes either doesn't have colliders or got a mass not yet updated.