From 9532911b004de03e34c992961e63cccc8b71ba18 Mon Sep 17 00:00:00 2001 From: Crizomb Date: Sun, 4 Jan 2026 19:05:27 +0100 Subject: [PATCH] small adjusts --- src/core/bubble.rs | 3 ++- src/core/wave.rs | 12 ++++++------ src/physics/density_grid.rs | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/core/bubble.rs b/src/core/bubble.rs index 50ae394..93dde77 100644 --- a/src/core/bubble.rs +++ b/src/core/bubble.rs @@ -30,7 +30,8 @@ pub fn bubble_spawn_wave(commands: &mut Commands, asset_server: &Res BubbleWaves { vec![BubbleSplash::new(NORMAL_BUBBLE, RIGHT, 10.0, 10), BubbleSplash::new(NORMAL_BUBBLE, TOP, 10.0, 10)], vec![BubbleSplash::new(NORMAL_BUBBLE, RIGHT, 10.0, 100), BubbleSplash::new(NORMAL_BUBBLE, TOP, 10.0, 100)], vec![ - BubbleSplash::new(NORMAL_BUBBLE, RIGHT, 10.0, 100), - BubbleSplash::new(NORMAL_BUBBLE, TOP, 10.0, 100), + BubbleSplash::new(NORMAL_BUBBLE, RIGHT, 100.0, 100), + BubbleSplash::new(NORMAL_BUBBLE, TOP, 100.0, 100), BubbleSplash::new(RED_BUBBLE, BOTTOM, 10.0, 20), ], vec![ - BubbleSplash::new(NORMAL_BUBBLE, RIGHT, 10.0, 200), - BubbleSplash::new(RED_BUBBLE, RIGHT, 10.0, 100), - BubbleSplash::new(RED_BUBBLE, LEFT, 10.0, 100), + BubbleSplash::new(NORMAL_BUBBLE, RIGHT, 100.0, 200), + BubbleSplash::new(RED_BUBBLE, RIGHT, 100.0, 100), + BubbleSplash::new(RED_BUBBLE, LEFT, 100.0, 100), ], ], collectables: vec![ diff --git a/src/physics/density_grid.rs b/src/physics/density_grid.rs index f163acf..225d0c5 100644 --- a/src/physics/density_grid.rs +++ b/src/physics/density_grid.rs @@ -11,7 +11,7 @@ const MAX_MAP_SIZE: usize = MAX_MAP_WIDTH * 2; const ARRAY_WIDTH: usize = MAX_MAP_SIZE / CELL_SIZE; const GRID_ARRAY_SIZE: usize = ARRAY_WIDTH * ARRAY_WIDTH; -const DENSITY_FORCE_SCALE: f32 = 6000.0; +const DENSITY_FORCE_SCALE: f32 = 3000.0; #[derive(Resource)] pub struct DensityGrid { @@ -78,7 +78,7 @@ pub fn density_grid_force( let index = get_index_from_uvec2(neighbor_cell); let density = density_grid.grid[index]; - density_gradient += offset.as_vec2() * density as f32; + density_gradient += offset.as_vec2().normalize_or_zero() * density as f32; } } density_gradient += density_obj.random_offset; // To not have a "grid" thingy