는 두기구를 만들어야합니다 - 스프라이트의 크기 중 하나를 (그리고 스프라이트이 고정으로 중앙에 배치)와 두 번째 원의 가장자리 (현재 충돌기구)
로 이동
2
정점
{5, -1, 6, 0, 5, 1, 4, 0}
,745의 반경 원에 대한 예 - 지금 당신은 그냥 거기에 배치 할 지점을 정의 원의 가장자리에 충돌 고정을 유지해야하는 경우
BodyDef bodyDef;
...
Body body = world.createBody(bodyDef);
FixtureDef circleFixture = new FixtureDef();
FixtureDef collisionFixture = new FixtureDef();
CircleShape circle = new CircleShape();
circle.setRadius(spriteRadius);
circleFixture.shape = circle;
//same for collision fixture with proper shape - (0,0) i a center of circle
float[] vertices = new float[]{x1, y1, x2, y2...};
ChainShape chain = new ChainShape();
chain.createLoop(vertices);
fixtureDefs.peek().shape = chain;
는
같은 것을 줄 것이다 당신이 원기구의 중심에 스프라이트를 렌더링 할 필요가 물론
처럼 회전 후에는 행동해야