diff --git a/src/bin/platformer/graphics.rs b/src/bin/platformer/graphics.rs index 080c85b..31ed7f5 100644 --- a/src/bin/platformer/graphics.rs +++ b/src/bin/platformer/graphics.rs @@ -348,7 +348,8 @@ impl Graphics { self.texture_white.bind (); - if coll.t <= 1.0 { + // kill_z + if coll.t <= 1.0 && coll.p_impact.z > -3.0 { let mvp = view_mat * Mat4::from_translation (coll.p_impact + Vec3::new (0.0, 0.0, 0.0625)) * Mat4::from_scale ((0.5, 0.5, 0.0).into ());