fishfolk / jumpy

Tactical 2D shooter in fishy pixels style. Made with Rust-lang 🦀 and Bevy 🪶
https://fishfolk.org/games/jumpy/
Other
1.65k stars 121 forks source link

fix: Avoid physics query slowdown over time by rebuilding broadphase every frame #962

Closed MaxCWhitehead closed 6 months ago

MaxCWhitehead commented 6 months ago

See #961 for context. There's a bug in parry2d involving incremental update failing to balance broadphase BVH. Fully rebuilding BVH avoids this issue, and we can get away with it due to few bodies in our game. This was our previous behavior before supporting dynamic bodies and relying on incremental update in physics pipeline, which turns out to be broken.