title: GestureDetector in libgdx
body: <p>I am new in libgdx. I have the following problem. I want to do pinch zooming for my game. For that I have <code>GestureDetectorListener</code> class in my <code>GameStage</code>.</p>
  
  <p>In <code>GameStage</code> I have the following code for <code>GestureDetector</code>:</p>
  
  <pre><code>OrthographicCamera camera = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
  this.setCamera(camera);
  
  
  GestureDetector gestureDetector = new GestureDetector(20, 0.5f, 2, 0.15f, new GestureDetectorListener());
  Gdx.input.setInputProcessor(gestureDetector);
  
  class GestureDetectorListener implements GestureListener {
      float initialScale = 1;
  
      @Override
      public boolean touchDown(float x, float y, int pointer, int button) {
          initialScale = camera.zoom;
          return true;
      }
  
      @Override
      public boolean tap(float x, float y, int count, int button) {
          // TODO Auto-generated method stub
          return true;
      }
  
      @Override
      public boolean longPress(float x, float y) {
          // TODO Auto-generated method stub
          return true;
      }
  
      @Override
      public boolean fling(float velocityX, float velocityY, int button) {
          // TODO Auto-generated method stub
          return true;
      }
  
      @Override
      public boolean pan(float x, float y, float deltaX, float deltaY) {
          return true;
      }
  
      @Override
      public boolean zoom(float initialDistance, float distance) {
          float ratio = initialDistance / distance;
          camera.zoom = initialScale * ratio;
          return true;
      }
  
      @Override
      public boolean pinch(Vector2 initialPointer1, Vector2 initialPointer2,
              Vector2 pointer1, Vector2 pointer2) {
          // TODO Auto-generated method stub
          return true;
      }
  
  }
  </code></pre>
  
  <p>Also I have set <code>InputListener</code> for the Actors of my stage, in order to drag them. The problem is that, when I set <code>InputProcessor</code> to <code>GestureDetector</code>, dragging of my Actors is not working. I want to have a pinch zooming with camera and <code>GestureDetector</code>, but it will not have an influence on dragging. How can I do that?</p>
  
  <p>Any help please!
  Thanks.</p>