Temporary fix for falling into void

Former-commit-id: 8e3d9c0c34e897f13cc60d5968f390ed0107dd76
This commit is contained in:
timokoesters 2019-05-11 21:37:23 +02:00
parent fbbdb8996b
commit 4ce1f9ee54

View File

@ -28,6 +28,12 @@ impl<'a> System<'a> for Sys {
// Movement
pos.0 += vel.0 * dt.0;
// Don't fall into the void
if pos.0.z < 0.0 {
pos.0.z = 0.0;
vel.0.z = 0.0;
}
// Basic collision with terrain
let mut i = 0;
while terrain