// constructor targetRoot = new Vector2(MathUtils.random(middle - 15, middle + 15), MathUtils.random(190, Gdx.graphics.getHeight() - 100)); xMovement = Missle.rate * ((Gdx.graphics.getWidth() - targetRoot.y) / Gdx.graphics.getHeight()); double ac = Math.pow((x - targetRoot.x), 2d); a = (y - targetRoot.y) / ac; // update pos.x -= xMovement * Gdx.graphics.getDeltaTime(); pos.y = (float) (this.a * Math.pow((pos.x - targetRoot.x), 2) + targetRoot.y);