diff --git a/source/Irrlicht/CTriangleSelector.cpp b/source/Irrlicht/CTriangleSelector.cpp index d02f2572..0cf500a4 100644 --- a/source/Irrlicht/CTriangleSelector.cpp +++ b/source/Irrlicht/CTriangleSelector.cpp @@ -272,11 +272,17 @@ void CTriangleSelector::getTriangles(core::triangle3df* triangles, if (cnt > (u32)arraySize) cnt = (u32)arraySize; - core::matrix4 mat; + core::matrix4 mat(core::matrix4::EM4CONST_NOTHING); if (transform) + { mat = *transform; - if (SceneNode&&useNodeTransform) - mat *= SceneNode->getAbsoluteTransformation(); + if (SceneNode && useNodeTransform) + mat *= SceneNode->getAbsoluteTransformation(); + } + else if (SceneNode && useNodeTransform) + mat = SceneNode->getAbsoluteTransformation(); + else + mat.makeIdentity(); for (u32 i=0; igetAbsoluteTransformation(); + } + else if (SceneNode && useNodeTransform) + mat = SceneNode->getAbsoluteTransformation(); else mat.makeIdentity(); - if (SceneNode && useNodeTransform) - mat *= SceneNode->getAbsoluteTransformation(); core::aabbox3df tBox(box); core::matrix4 invMat(core::matrix4::EM4CONST_NOTHING); diff --git a/tests/tests-last-passed-at.txt b/tests/tests-last-passed-at.txt index ee7e9c09..661557bc 100644 --- a/tests/tests-last-passed-at.txt +++ b/tests/tests-last-passed-at.txt @@ -1,4 +1,4 @@ Tests finished. 72 tests of 72 passed. Compiled as DEBUG -Test suite pass at GMT Wed Dec 13 14:06:37 2023 +Test suite pass at GMT Wed Dec 13 15:00:54 2023