diff options
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Camera.java | 2 | ||||
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Camera.java b/core/src/ch/asynk/gdx/boardgame/Camera.java index d72f15c..322c6d5 100644 --- a/core/src/ch/asynk/gdx/boardgame/Camera.java +++ b/core/src/ch/asynk/gdx/boardgame/Camera.java @@ -153,7 +153,7 @@ public class Camera extends OrthographicCamera { float deltaX = (dx * zoom * widthFactor); float deltaY = (dy * zoom * heightFactor); - translate(deltaX, -deltaY, 0); + translate(-deltaX, deltaY, 0); clampPosition(); update(true); } diff --git a/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java b/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java index 4c51780..b8c4acb 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java @@ -158,8 +158,8 @@ public abstract class AbstractScreen implements Screen } @Override public boolean touchDragged(int x, int y, int pointer) { - int dx = (int) (dragPos.x - x); - int dy = (int) (dragPos.y - y); + int dx = (int) (x - dragPos.x); + int dy = (int) (y - dragPos.y); dragPos.set(x, y); onDragged(dx, dy); return true; |