title: Andengine, making a sprite move in random direction
body: <p>i want to make a sprite move when i click on it, but i have a problem... The sprite always goes to the upper left corner, i tried to put random values, but it gives no result</p>
  
  <pre><code>ballITexture = TextureRegionFactory.extractFromTexture(BaseActivity.getSharedInstance().ballTexture);
  final Random rand = new Random();
  sprite = new Sprite(0, 0, ballITexture, BaseActivity.getSharedInstance().getVertexBufferObjectManager()){
              @Override
              public boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY) {
                 randomMove(rand.nextInt(4), pTouchAreaLocalX, pTouchAreaLocalY, this);
  
              };
  
  mCamera = BaseActivity.getSharedInstance().mCamera;
  sprite.setPosition(mCamera.getWidth() / 2 - sprite.getWidth() / 2, mCamera.getHeight() / 2 - sprite.getHeight() / 2);
  moveable = true;
  </code></pre>
  
  <p>and this is randomMove method:</p>
  
  <pre><code>private void randomMove(int direction, float pTouchAreaLocalX, float pTouchAreaLocalY, Sprite sprite){
  
      switch(direction){
              case 0:
                  sprite.registerEntityModifier(new MoveModifier(1, pTouchAreaLocalX, 1, pTouchAreaLocalY, 1));
                  break;
              case 1:
                  sprite.registerEntityModifier(new MoveModifier(1, pTouchAreaLocalX, 1, pTouchAreaLocalY, -1));
                  break;
              case 2:
                  sprite.registerEntityModifier(new MoveModifier(1, pTouchAreaLocalX, -1, pTouchAreaLocalY, 1));
                  break;
              case 3:
                  sprite.registerEntityModifier(new MoveModifier(1, pTouchAreaLocalX, -1, pTouchAreaLocalY, -1));
                  break;
          }
  
  }
  </code></pre>
  
  <p>my question is, why my sprite goes always to up-left corner when I touch it, instead of moving in random direction? How to solve it?</p>