由网友(栖身星河之中)分享简介:我可以用于创建例如墙创建矩形:I can create rectangle for creating wall for example:final Rectangle wall = new Rectangle(CAMERA_WIDTH-2, 0, 2, CAMERA_HEIGHT -2);PhysicsFactory...
我可以用于创建例如墙创建矩形:
I can create rectangle for creating wall for example:
final Rectangle wall = new Rectangle(CAMERA_WIDTH-2, 0, 2, CAMERA_HEIGHT -2);
PhysicsFactory.createBoxBody(this.physicsWorld, wall, BodyType.StaticBody, FIXTURE_DEF);
scene.attachChild(wall);
不过,我想创建圈子?例如ball.it应该是Box2D的身体像上面。
But i wanna create circle? for example ball.it should be body of box2d like above.
推荐答案
它实际上是pretty简单:
It is actually pretty simple:
Body circleBody = PhysicsFactory.createCircleBody(pWorld, pSprite, BodyType.StaticBody, FixtureDef);
相关推荐
最新文章