Merge pull request #5056 from sutajo/fix_pretransform_vertices_with_cameras
Fix pretransform vertices with cameraspull/5064/head
commit
679eb972e6
|
@ -1213,11 +1213,6 @@ aiNode *ImportNode(aiScene *pScene, glTF2::Asset &r, std::vector<unsigned int> &
|
|||
|
||||
if (node.camera) {
|
||||
pScene->mCameras[node.camera.GetIndex()]->mName = ainode->mName;
|
||||
if (node.translation.isPresent) {
|
||||
aiVector3D trans;
|
||||
CopyValue(node.translation.value, trans);
|
||||
pScene->mCameras[node.camera.GetIndex()]->mPosition = trans;
|
||||
}
|
||||
}
|
||||
|
||||
if (node.light) {
|
||||
|
|
|
@ -577,7 +577,7 @@ void PretransformVertices::Execute(aiScene *pScene) {
|
|||
// multiply all properties of the camera with the absolute
|
||||
// transformation of the corresponding node
|
||||
cam->mPosition = nd->mTransformation * cam->mPosition;
|
||||
cam->mLookAt = aiMatrix3x3(nd->mTransformation) * cam->mLookAt;
|
||||
cam->mLookAt = nd->mTransformation * cam->mLookAt;
|
||||
cam->mUp = aiMatrix3x3(nd->mTransformation) * cam->mUp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue