From d2f3691e93f11ad3b0e575e1a380411b588fe65d Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sun, 24 Nov 2024 17:20:45 +0100 Subject: [PATCH] no more z fighting --- src/game/scene.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/scene.rs b/src/game/scene.rs index fc3bfe8..10383b5 100644 --- a/src/game/scene.rs +++ b/src/game/scene.rs @@ -197,7 +197,11 @@ fn spawn_block( transform: Transform::from_xyz( x + block_size * ((len as f32 - 1.) / 2.), y, - WORLD_DEPTH, + if fixed { + WORLD_DEPTH + } else { + WORLD_DEPTH - 0.01 + }, ), ..Default::default() },