From bb9301114491bf338d1accac2d4aed4edc5eb355 Mon Sep 17 00:00:00 2001 From: badlogic Date: Tue, 11 Apr 2017 12:25:09 +0200 Subject: [PATCH] [libgdx] Fixed Box2D test, offset bounding boxes by skeleton x/y --- .../src/com/esotericsoftware/spine/Box2DExample.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java index 68aba82a3..1793a1c38 100644 --- a/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/Box2DExample.java +++ b/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); }