From 794dd8cff7ec8ca24baaf715e315cca9d29a465b Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sun, 5 May 2019 15:14:53 -0700 Subject: [PATCH] Disabled camera movement when path generated --- tools/src/com/riiablo/map/MapViewer.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/src/com/riiablo/map/MapViewer.java b/tools/src/com/riiablo/map/MapViewer.java index 06c9fd5c..e2005b72 100644 --- a/tools/src/com/riiablo/map/MapViewer.java +++ b/tools/src/com/riiablo/map/MapViewer.java @@ -6,8 +6,6 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.InputAdapter; import com.badlogic.gdx.InputMultiplexer; -import com.badlogic.gdx.ai.utils.Collision; -import com.badlogic.gdx.ai.utils.Ray; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; @@ -183,9 +181,9 @@ public class MapViewer extends ApplicationAdapter { case Input.Buttons.LEFT: GridPoint2 dstCoords = mapRenderer.coords(); dst = new Vector2(dstCoords.x, dstCoords.y); - Collision collision = new Collision<>(new Vector2(), null); - boolean hit = map.castRay(collision, new Ray<>(new Vector2(src.x, src.y), new Vector2(dst.x, dst.y))); - if (hit) ent.position().set(collision.point); + //Collision collision = new Collision<>(new Vector2(), null); + //boolean hit = map.castRay(collision, new Ray<>(new Vector2(src.x, src.y), new Vector2(dst.x, dst.y))); + //if (hit) ent.position().set(collision.point); // FIXME: only works coming from top onto bottom left or bottom right map.findPath(src, dst, path);