diff --git a/interfaces/Crafter.Math-Intersection.cppm b/interfaces/Crafter.Math-Intersection.cppm index fe67078..ced5301 100755 --- a/interfaces/Crafter.Math-Intersection.cppm +++ b/interfaces/Crafter.Math-Intersection.cppm @@ -195,13 +195,13 @@ namespace Crafter { export template constexpr bool IntersectionTestSphereOrientatedBox(Vector spherePos, T sphereRadius, Vector boxSize, MatrixRowMajor boxMat) { - Vector d = spherePos - Vector(boxMat[0][4], boxMat[1][4], boxMat[2][4]); + Vector d = spherePos - Vector(boxMat.m[0][4], boxMat.m[1][4], boxMat.m[2][4]); T distSq = 0.0f; for (std::uint32_t i = 0; i < 3; ++i) { - Vector axis(boxMat[0][i], boxMat[1][i], boxMat[2][i]); + Vector axis(boxMat.m[0][i], boxMat.m[1][i], boxMat.m[2][i]); T dist = Vector::Dot(d, axis); T excess = std::fabs(dist) - boxSize.v[i]; excess = std::max(excess, 0.0f);