tuning jitter min/max pipe values

main
Elijah Voigt 3 months ago
parent 0873380d11
commit 068f7363a9

@ -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));

Loading…
Cancel
Save