When the "ZUp" option was added to the fbx loader, it broke the previous behavior of converting to the OpenGL axis system. I'm referencing the following commit:

c168887e5e

This commit inverted the value of the "fSign" variable, but did not update the previous code that used the variable. I've attached the change that restores the original behavior when not using the "ZUp"
This commit is contained in:
Farshid Lashkari
2017-04-18 16:01:58 +01:00
committed by Robert Osfield
parent d9b62b39e1
commit 420d3065f4

View File

@@ -409,13 +409,13 @@ ReaderWriterFBX::readNode(const std::string& filenameInit,
switch (eUp)
{
case FbxAxisSystem::eXAxis:
mat.set(0,fSign,0,0,-fSign,0,0,0,0,0,HorizSign,0,0,0,0,1);
mat.set(0,-fSign,0,0,fSign,0,0,0,0,0,HorizSign,0,0,0,0,1);
break;
case FbxAxisSystem::eYAxis:
mat.set(1,0,0,0,0,fSign,0,0,0,0,fSign*HorizSign,0,0,0,0,1);
mat.set(1,0,0,0,0,-fSign,0,0,0,0,-fSign*HorizSign,0,0,0,0,1);
break;
case FbxAxisSystem::eZAxis:
mat.set(1,0,0,0,0,0,-fSign*HorizSign,0,0,fSign,0,0,0,0,0,1);
mat.set(1,0,0,0,0,0,fSign*HorizSign,0,0,-fSign,0,0,0,0,0,1);
break;
}
refCoordSysChange = true;