Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) {
RegionAttachment regionAttachment = (RegionAttachment)attachment;
regionAttachment.updateWorldVertices(slot, false);
float[] vertices = regionAttachment.getWorldVertices();
shapes.line(vertices[X1], vertices[Y1], vertices[X2], vertices[Y2]);
shapes.line(vertices[X2], vertices[Y2], vertices[X3], vertices[Y3]);
shapes.line(vertices[X3], vertices[Y3], vertices[X4], vertices[Y4]);
shapes.line(vertices[X4], vertices[Y4], vertices[X1], vertices[Y1]);
}
}