所以,我一直是這樣的:Box2D的身體不動
physicsWorld=new PhysicsWorld(new Vector2(10, 10), false);
Rectangle test = new Rectangle(100, 100, 50, 50, vbom);
FixtureDef wallFixtureDef = PhysicsFactory.createFixtureDef(0, 0f, 0.5f);
Body body = PhysicsFactory.createBoxBody(physicsWorld, test, BodyType.DynamicBody, wallFixtureDef);
physicsWorld.registerPhysicsConnector(new PhysicsConnector(test, body));
body.setLinearVelocity(100, 100);
registerUpdateHandler(physicsWorld);
attachChild(test);
,並沒有工作,身體不動。 任何想法爲什麼?
GLES 2 AnchorCenter
你正在走向世界嗎? – Axis 2013-03-27 20:33:40
你是什麼意思「踏入這個世界」 如果「我正在更新我的場景」是的,我在這裏: registerUpdateHandler(physicsWorld); – 2013-03-27 20:52:21
對不起我的錯誤 – Axis 2013-03-27 21:15:30