From 068f7363a945a6965c8785fda48359e3c45df6b0 Mon Sep 17 00:00:00 2001 From: Elijah Voigt Date: Mon, 4 Aug 2025 11:54:25 -0700 Subject: [PATCH] tuning jitter min/max pipe values --- src/bin/flappy/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/flappy/main.rs b/src/bin/flappy/main.rs index 766989e..d70eff0 100644 --- a/src/bin/flappy/main.rs +++ b/src/bin/flappy/main.rs @@ -226,14 +226,14 @@ fn init_obstacles( info!("Jitter for {i} is {jitter}"); let above = { let x = 300.0 * i as f32; - let y = 300.0 + jitter; + let y = f32::min(300.0 + jitter, 400.0); Transform::from_xyz(x, y, -1.0).with_scale(Vec3::splat(100.0)) }; commands.spawn((pipe.clone(), above)); let below = { let x = 300.0 * i as f32; - let y = -200.0 + jitter; + let y = f32::max(-200.0 + jitter, -300.0); Transform::from_xyz(x, y, -1.0).with_scale(Vec3::splat(100.0)) }; commands.spawn((pipe.clone(), below));