|
@@ -59,16 +59,18 @@ function SkeletonBounds:update (skeleton, updateAabb)
|
|
local slots = skeleton.slots
|
|
local slots = skeleton.slots
|
|
|
|
|
|
for _,slot in ipairs(skeleton.slots) do
|
|
for _,slot in ipairs(skeleton.slots) do
|
|
- local attachment = slot.attachment
|
|
|
|
- if attachment and attachment.type == AttachmentType.boundingbox then
|
|
|
|
- local boundingBox = attachment
|
|
|
|
- table_insert(boundingBoxes, boundingBox)
|
|
|
|
-
|
|
|
|
- local polygon = {}
|
|
|
|
- table_insert(polygons, polygon)
|
|
|
|
-
|
|
|
|
- boundingBox:computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2)
|
|
|
|
- end
|
|
|
|
|
|
+ if (slot.bone.active) then
|
|
|
|
+ local attachment = slot.attachment
|
|
|
|
+ if attachment and attachment.type == AttachmentType.boundingbox then
|
|
|
|
+ local boundingBox = attachment
|
|
|
|
+ table_insert(boundingBoxes, boundingBox)
|
|
|
|
+
|
|
|
|
+ local polygon = {}
|
|
|
|
+ table_insert(polygons, polygon)
|
|
|
|
+
|
|
|
|
+ boundingBox:computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2)
|
|
|
|
+ end
|
|
|
|
+ end
|
|
end
|
|
end
|
|
|
|
|
|
if updateAabb then
|
|
if updateAabb then
|