Hello! I'm trying to make falling snow in AndEngine . It seems like there are modifiers for the movement of sprites, but I can not find anything.

 public Scene onLoadScene() { Random randomGenerator = new Random(); pX = randomGenerator.nextInt(CAMERA_WIDTH); Sprite snow = new Sprite (pX, 1, 30, 30, mTextureSnowRegion); scene.getLastChild().attachChild(snow); return scene;} 

The result is one snowflake with an arbitrary initial coordinate "x" and with у=1 . And now attention to the question:

  1. How to make this snowflake fall?
  2. How to make the snowflakes appear with a certain frequency and, reaching the bottom edge of the camera, disappear?

    1 answer 1

    In order for objects on the scene in AndEngine to fall, gravity is needed. You can add it to your application using the Physics Box2D Extension. A detailed example of how to do this is in this article .