don't draw player shadow over the death pit

main
_ 2021-12-23 01:43:30 +00:00
parent a3fcff78f9
commit 14665512e1
1 changed files with 2 additions and 1 deletions

View File

@ -348,7 +348,8 @@ impl Graphics {
self.texture_white.bind (); 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 * let mvp = view_mat *
Mat4::from_translation (coll.p_impact + Vec3::new (0.0, 0.0, 0.0625)) * Mat4::from_translation (coll.p_impact + Vec3::new (0.0, 0.0, 0.0625)) *
Mat4::from_scale ((0.5, 0.5, 0.0).into ()); Mat4::from_scale ((0.5, 0.5, 0.0).into ());