Fixed block snapping at lower framerates

This commit is contained in:
Joshua Barretto 2019-07-09 14:04:30 +01:00
parent 0f0f28284c
commit 9f6f9cb25f

View File

@ -319,7 +319,7 @@ impl<'a> System<'a> for Sys {
// If the space below us is free, then "snap" to the ground
if collision_with(pos.0 - Vec3::unit_z() * 1.05, near_iter.clone())
&& vel.0.z < 0.0
&& vel.0.z > -1.0
&& vel.0.z > -3.0
&& was_on_ground
{
pos.0.z = (pos.0.z - 0.05).floor();