diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2026-08-23 23:35:57 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2026-08-23 23:35:57 -0700 |
| commit | 5bedb15c61ad26824dbe6053f0b66b11b6ad5047 (patch) | |
| tree | 97c91f976a9ccaf81c3fb91d40f18752a81d7685 /src/sim/lib/force.rs | |
| parent | 245d8eb77d7b92a50a48d4b953e5a8e0d789307c (diff) | |
fix scaling
Diffstat (limited to 'src/sim/lib/force.rs')
| -rw-r--r-- | src/sim/lib/force.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sim/lib/force.rs b/src/sim/lib/force.rs index e99817c..c110c29 100644 --- a/src/sim/lib/force.rs +++ b/src/sim/lib/force.rs @@ -3,7 +3,6 @@ use rand::random_range; use rapier2d::{dynamics::RigidBodyHandle, parry::bounding_volume::Aabb, pipeline::QueryFilter}; use crate::{ - config::CELLS_TO_METRES, content::materials::{MaterialForm, MaterialId, fire::FireCellView}, sim::{cell::Cell, lib::ray::AwDda, particle_manager::particle::Particle, sim_manager::SimCtx}, }; @@ -82,10 +81,7 @@ pub fn apply_explosion( .physics_manager .world .intersect_aabb_conservative( - Aabb::new( - (centre - radius as f32) / CELLS_TO_METRES, - (centre + radius as f32) / CELLS_TO_METRES, - ), + Aabb::new(centre - radius as f32, (centre + radius as f32)), QueryFilter::only_dynamic(), ); @@ -96,7 +92,7 @@ pub fn apply_explosion( && let Some(body) = ctx.rb_manager.physics_manager.world.bodies.get_mut(h) { // magic divisor number for good vibes - body.apply_impulse(get_vel(body.translation() * CELLS_TO_METRES) / 3.0, true); + body.apply_impulse(get_vel(body.translation()) / 3.0, true); } } } |
