Using unProject correctly in Java Libgdx
I want to make a button clickable, but it isn't working - it seems like I need to use unproject() but I can't figure out how. The code in question is: Texture playButtonImage; SpriteBatch batch; ClickListener clickListener; Rectangle playButtonRectangle; Vector2 touchPos; OrthographicCamera camera; @Override public void show() { playButtonImage = new Texture(Gdx.files.internal("PlayButton.png")); camera = new OrthographicCamera(); camera.setToOrtho(false, 800, 480); batch = new SpriteBatch(); playButtonRectangle = new Rectangle(); playButtonRectangle.x = 400; playButtonRectangle.y = 250;