浏览代码

Fix FBX units not being converted from CM to application scale

Gordon MacPherson 6 年之前
父节点
当前提交
d56198774e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      code/FBX/FBXImporter.cpp

+ 2 - 2
code/FBX/FBXImporter.cpp

@@ -193,8 +193,8 @@ void FBXImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
         // convert the FBX DOM to aiScene
         ConvertToAssimpScene(pScene, doc, settings.removeEmptyBones, unit);
         
-        // Set file scale relative to meters
-        SetFileScale( doc.GlobalSettings().UnitScaleFactor() );
+        // units is relative to CM :) we need it in meters for assimp
+        SetFileScale( doc.GlobalSettings().UnitScaleFactor() * 0.01f);
 
         std::for_each(tokens.begin(),tokens.end(),Util::delete_fun<Token>());
     }