a
This commit is contained in:
parent
d17b004e7e
commit
810240a80d
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue