diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index c3e14d68f..47569a035 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -287,10 +287,12 @@ void IFCImporter::InternReadFile( const std::string& pFile, conv.materials.clear(); } - // apply world coordinate system (which includes the scaling to convert to metres) - aiMatrix4x4 scale; + // apply world coordinate system (which includes the scaling to convert to metres and a -90 degrees rotation around x) + aiMatrix4x4 scale, rot; aiMatrix4x4::Scaling(aiVector3D(conv.len_scale,conv.len_scale,conv.len_scale),scale); - pScene->mRootNode->mTransformation = scale * conv.wcs * pScene->mRootNode->mTransformation; + aiMatrix4x4::RotationX(-AI_MATH_HALF_PI_F,rot); + + pScene->mRootNode->mTransformation = rot * scale * conv.wcs * pScene->mRootNode->mTransformation; // this must be last because objects are evaluated lazily as we process them if ( !DefaultLogger::isNullLogger() ){