diff --git a/RadishForAndroid/src/framework/physics/BoundingBoxVisitor.java b/RadishForAndroid/src/framework/physics/BoundingBoxVisitor.java index e4e664d..bc12a3c 100644 --- a/RadishForAndroid/src/framework/physics/BoundingBoxVisitor.java +++ b/RadishForAndroid/src/framework/physics/BoundingBoxVisitor.java @@ -47,7 +47,7 @@ BoundingSphere bs = (BoundingSphere)obj.bs.clone(); for (int i = stackList.size() - 1; i >= 0; i--) { obb.transform(stackList.get(i)); - bs.transform(stackList.get(i)); + if (i >= stackList.size() - 4) bs.transform(stackList.get(i)); } if (partName == null || partName.length() == 0 || inPart) { obbList.add(obb); // Transform3D��K��������Bounds��boundsList�ɒlj� @@ -72,12 +72,16 @@ stackTop--; } if (obj.bs != null && stackTop >= 0) { + BoundingSphere bs = (BoundingSphere)obj.bs.clone(); + for (int i = stackList.size() - 1; i >= stackList.size() - 4; i--) { + bs.transform(stackList.get(i)); + } if (bsStack.get(stackTop) == null) { // ���̊K�w�̍ŏ��̃I�u�W�F�N�g�̏ꍇ�Anull��u������ - bsStack.set(stackTop, obj.bs); + bsStack.set(stackTop, bs); } else { // ���̊K�w��2�Ԗڈȍ~�̃I�u�W�F�N�g�̏ꍇ�A���� - bsStack.get(stackTop).combine(obj.bs); + bsStack.get(stackTop).combine(bs); } } }