소스 검색

[libgdx] Fixed Box2D test, offset bounding boxes by skeleton x/y

badlogic 8 년 전
부모
커밋
bb93011144
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java

+ 2 - 2
spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java

@@ -156,8 +156,8 @@ public class Box2DExample extends ApplicationAdapter {
 			if (!(slot.getAttachment() instanceof Box2dAttachment)) continue;
 			Box2dAttachment attachment = (Box2dAttachment)slot.getAttachment();
 			if (attachment.body == null) continue;
-			float x = skeleton.x + slot.getBone().getWorldX();
-			float y = skeleton.y + slot.getBone().getWorldY();
+			float x = slot.getBone().getWorldX();
+			float y = slot.getBone().getWorldY();
 			float rotation = slot.getBone().getWorldRotationX();
 			attachment.body.setTransform(x, y, rotation * MathUtils.degRad);
 		}