Skip to content

Commit

Permalink
[cocos2d-objc] Fixed calculation of bounding box.
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jul 26, 2019
1 parent 3e84da4 commit 45b8125
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spine-cocos2d-objc/src/spine/SkeletonRenderer.m
Expand Up @@ -280,8 +280,8 @@ -(void)draw:(CCRenderer *)renderer transform:(const GLKMatrix4 *)transform {
minY = MIN(vertices[i+1], minY);
maxY = MAX(vertices[i+1], maxY);
}
GLKVector2 center = GLKVector2Make((maxX - minX) / 2, (maxY - minY) / 2);
GLKVector2 extents = GLKVector2Make((maxX - minX), (maxY - minY));
GLKVector2 center = GLKVector2Make(minX + (maxX - minX) / 2, minY + (maxY - minY) / 2);
GLKVector2 extents = GLKVector2Make((maxX - minX) / 2, (maxY - minY) / 2);
isVisible = CCRenderCheckVisbility(transform, center, extents);
}

Expand Down

0 comments on commit 45b8125

Please sign in to comment.