diff --git a/src/main/java/net/pivipi/physics/Physics.java b/src/main/java/net/pivipi/physics/Physics.java index 651e748..85a9679 100644 --- a/src/main/java/net/pivipi/physics/Physics.java +++ b/src/main/java/net/pivipi/physics/Physics.java @@ -19,10 +19,10 @@ public class Physics { public void applyPhysics(double delta) { velocity = velocity.sub(0, gravity * delta, 0); - VisibleSweepResult result = Collision.willCollideWithGround(5, entity, velocity.mul(delta)); - System.out.println(entity.hasCollision()); - if (result != null) { - System.out.println(result.res); + VisibleSweepResult result = Collision.willCollideWithGround(5, entity, velocity); + System.out.println(result); + if (entity.isOnGround()) { + //System.out.println(result.res); velocity = velocity.mul(0, -bounciness, 0); }