title: AndEngine, Move Sprite smoothly using Accelerometer & PhysicsWorld
body: <p>Using AndEngine, Im trying to move a sprite (ball) with the accelerometer which is supposed to bounce of walls and hit other obstacles. </p>
  
  <p>so far I've found the following two methods.</p>
  
  <pre><code> public void onAccelerometerChanged(final AccelerometerData myAccelerometerData) {
      mySprite.setPosition(mySprite.getX() + myAccelerometerData.getX(), mySprite.getY() + myAccelerometerData.getY());
  
  }
  </code></pre>
  
  <p>This works very smoothly but in a non physics world only.  (i.e will not bounce of walls and other obstacles smoothly).</p>
  
  <p>And now using this method which is in the examples provided by AndEngine, the ball has good physics but does not move as smoothly as i would like to. </p>
  
  <pre><code> @Override
      public void onAccelerometerChanged(final AccelerometerData pAccelerometerData) {
              final Vector2 gravity = Vector2Pool.obtain(pAccelerometerData.getX(), pAccelerometerData.getY());
              this.mPhysicsWorld.setGravity(gravity);
              Vector2Pool.recycle(gravity);
      }
  </code></pre>
  
  <p>I've also tried multiplying pAccelerometerData with certain values such as 2 and 5, yes it appears more responsive but also makes the ball move a lot faster and difficult to play.</p>
  
  <p>To make my question clear, I would like my game to be as smooth as the balls in Labyrinth or Rebound game are for Android. The balls in them are are more responsive to accelerometer. For instance if you want to stop a moving ball suddenly in Labyrinth, you can but with the following code in andEngine example, it keeps moving for a while as if it is moving in a frictionless world. </p>
  
  <p>Is there anyway I can make it more responsive and smooth like that of the Labyrinth game?
  <a href="https://market.android.com/details?id=se.illusionlabs.labyrinth.lite&amp;hl=en" rel="nofollow">https://market.android.com/details?id=se.illusionlabs.labyrinth.lite&amp;hl=en</a></p>