Export to GitHub

libgdx - issue #1758

java.lang.NoSuchMethodError in camera.unproject on mouse click


Posted on Aug 29, 2014 by Massive Giraffe

Issue : java.lang.NoSuchMethodError in camera.unproject on mouse click

Stack Trace: Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: com.badlogic.gdx.graphics.OrthographicCamera.unproject(Lcom/badlogic/gdx/math/Vector3;)V at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120) Caused by: java.lang.NoSuchMethodError: com.badlogic.gdx.graphics.OrthographicCamera.unproject(Lcom/badlogic/gdx/math/Vector3;)V at gr.sullenart.games.fruitcatcher.screens.MenuScreen.touchDown(MenuScreen.java:185) at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:317) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:199) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)

This is my code : @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { Vector3 touchPos = new Vector3(); touchPos.set(screenX, screenY, 0); camera.unproject(touchPos); -> Exception is thrown from here.

And these are the values I see in debugger screenX = 404 screenY = 191 pointer = 0 button = 0 touchPos = Vector3 [404.0,191.0,0.0]

Comment #1

Posted on Sep 11, 2014 by Swift Cat

The libGDX issue tracker has been moved to https://github.com/libgdx/libgdx/issues. This issue tracker is not monitored and should not be used. To prevent others from using this issue tracker, I will close this issue now. If you haven't done so already, please consider posting your issue on the new issue tracker at https://github.com/libgdx/libgdx/issues.

Status: Invalid

Labels:
Type-Defect Priority-Medium