I’m using AndEngine to try and create a simple sprite of a ball rotating 360 degrees constantly. The rotation is working fine. However, the picture of the ball looks distorted ONLY in portrait mode.
Portrait:

Landscape:

You’ll notice how in Portrait mode the ball seems to be stretching upwards. I’m not sure what could be causing this. I would just like the ball to remain perfectly circular.
In case anybody asks.. the ball image is perfectly circular and is 200px x 200px.
Here is my code:
Ball = new Sprite(100, 100, 200, 200, this.BallRegion);
LoopEntityModifier EntityModifier =
new LoopEntityModifier(new RotationModifier(10, 0, 360));
Ball.registerEntityModifier(EntityModifier);
scene.attachChild(Ball);
My resolution policy:
this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
return new org.anddev.andengine.engine.Engine(new EngineOptions(true,
null, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT),
this.mCamera));
Figured it out myself. To handle the orientation change with a live wallpaper in AndEngine, you can use the following code:
You may have to alter the values depending on your resolution policy, but this works perfectly for me.