diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/MenuCamera.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/MenuScreen.java | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/screens/MenuCamera.java b/core/src/ch/asynk/tankontank/screens/MenuCamera.java index ec5f48a..d71d839 100644 --- a/core/src/ch/asynk/tankontank/screens/MenuCamera.java +++ b/core/src/ch/asynk/tankontank/screens/MenuCamera.java @@ -59,9 +59,9 @@ public class MenuCamera extends OrthographicCamera return window.height; } - public Vector3 uiUnproject(Vector3 v) + public Vector3 uiUnproject(float x, float y, Vector3 v) { - return uiCamera.unproject(v); + return uiCamera.unproject(v.set(x, y, 0f)); } public Matrix4 uiCombined() diff --git a/core/src/ch/asynk/tankontank/screens/MenuScreen.java b/core/src/ch/asynk/tankontank/screens/MenuScreen.java index 9c2febd..cc6d567 100644 --- a/core/src/ch/asynk/tankontank/screens/MenuScreen.java +++ b/core/src/ch/asynk/tankontank/screens/MenuScreen.java @@ -93,8 +93,7 @@ public class MenuScreen implements Screen @Override public boolean touchDown(int x, int y, int pointer, int button) { - touch.set(x, y, 0f); - camera.uiUnproject(touch); + camera.uiUnproject(x, y, touch); return hit(touch.x, touch.y); } }); |