Instead of removing post rotation completely, setting the Directional light to return KRVector3::Up()

--HG--
branch : nfb
This commit is contained in:
Kelly
2014-04-10 19:12:19 -07:00
parent fa71fe6041
commit 6135178ccc
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ KRVector3 KRDirectionalLight::getWorldLightDirection() {
} }
KRVector3 KRDirectionalLight::getLocalLightDirection() { KRVector3 KRDirectionalLight::getLocalLightDirection() {
return KRVector3::Forward(); return KRVector3::Up(); //&KRF HACK changed from KRVector3::Forward(); - to compensate for the way Maya handles post rotation.
} }

View File

@@ -926,7 +926,7 @@ void LoadNode(FbxScene* pFbxScene, KRNode *parent_node, FbxGeometryConverter *pG
KRVector3 node_pre_rotation, node_post_rotation; KRVector3 node_pre_rotation, node_post_rotation;
if(rotation_active) { if(rotation_active) {
node_pre_rotation = KRVector3(pre_rotation[0], pre_rotation[1], pre_rotation[2]) / 180.0 * M_PI; node_pre_rotation = KRVector3(pre_rotation[0], pre_rotation[1], pre_rotation[2]) / 180.0 * M_PI;
//node_post_rotation = KRVector3(post_rotation[0], post_rotation[1], post_rotation[2]) / 180.0 * M_PI; node_post_rotation = KRVector3(post_rotation[0], post_rotation[1], post_rotation[2]) / 180.0 * M_PI;
//&KRF HACK removing this line (above) to prevent the post rotation from corrupting the default light values; the FBX is importing a post rotation and setting it to -90 degrees //&KRF HACK removing this line (above) to prevent the post rotation from corrupting the default light values; the FBX is importing a post rotation and setting it to -90 degrees
} else { } else {
node_pre_rotation = KRVector3::Zero(); node_pre_rotation = KRVector3::Zero();