diff --git a/src/main/java/my/karma/app/KarmaPlatform.java b/src/main/java/my/karma/app/KarmaPlatform.java index 33a8b4e..616c12a 100644 --- a/src/main/java/my/karma/app/KarmaPlatform.java +++ b/src/main/java/my/karma/app/KarmaPlatform.java @@ -1748,6 +1748,7 @@ private void applyWorldDisturbance(World world, Entity entity, double d) { if (dist.box.intersects(entity.box) || dist.box.contains(entity.box)) { // TODO add forces and acceleration to Entity. entity.forces.addAll(dist.forces); + //entity.velocity = entity.velocity.multiply(dist.getMaterial().friction); } } } diff --git a/src/main/java/my/karma/app/scenes/PlayScene.java b/src/main/java/my/karma/app/scenes/PlayScene.java index d26818d..e1bf437 100644 --- a/src/main/java/my/karma/app/scenes/PlayScene.java +++ b/src/main/java/my/karma/app/scenes/PlayScene.java @@ -34,7 +34,7 @@ public void create(KarmaPlatform app) { .setPosition(0, 0) .setSize(w.getPlayArea().getWidth(), w.getPlayArea().getHeight() * 0.8) .addForce(new KarmaPlatform.Vector2D(0.0002, 0.0)) - ); + .setMaterial(KarmaPlatform.Material.DEFAULT)); w.addDisturbance((KarmaPlatform.Disturbance) new KarmaPlatform.Disturbance("mag") .setPosition(0, 0) @@ -42,6 +42,7 @@ public void create(KarmaPlatform app) { .setForegroundColor(new Color(0.7f, 0.6f, 0.0f, 0.5f)) .setBackgroundColor(new Color(0.7f, 0.6f, 0.0f, 0.5f)) .addForce(new KarmaPlatform.Vector2D(-0.002, -0.012)) + .setMaterial(KarmaPlatform.Material.DEFAULT) ); createPlatforms(app); @@ -54,7 +55,7 @@ public void create(KarmaPlatform app) { .setMaterial( new KarmaPlatform.Material( "water", - 0.98, 1.0, 0.2)) + 0.90, 0.6, 0.2)) .setPosition(16, (w.getPlayArea().getHeight() * 0.75)) .setSize(w.getPlayArea().getWidth() - 32, (w.getPlayArea().getHeight() * 0.25) - 32) .setForegroundColor(new Color(0.0f, 0.0f, 0.8f, 0.5f))