为什么物理体在anndngine gles2锚中心动态壁纸中自动向上移动

Ren*_*K N 3 android game-physics andengine live-wallpaper

我正在尝试使用andengine gles2锚点中心开发一个动态壁纸,有一些物理.但是当我添加一个物理对象时,它向上移动.而不是由于重力向下移动
我正在制作的错误请帮助我理清问题

这是我的代码

FixtureDef FIXTURE_DEF = PhysicsFactory.createFixtureDef(1, 0.5f,
                0.5f);
mPhysicsWorld = new PhysicsWorld(new Vector2(0,
                        SensorManager.GRAVITY_EARTH), false);
final AnimatedSprite animatedSprite;
animatedSprite = new AnimatedSprite(500, 250,
                        this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager());

body = PhysicsFactory.createBoxBody(this.mPhysicsWorld, animatedSprite,
                        BodyType.DynamicBody, FIXTURE_DEF);

scene.attachChild(animatedSprite);
animatedSprite.animate(200);
mPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(
                        animatedSprite, body, true, true));
Run Code Online (Sandbox Code Playgroud)

Dav*_*vid 5

只需乘以SensorManager.GRAVITY_EARTH-1即可.