Fix mLookAt with pretransformed vertices
mLookAt is a position vector inside the nodes reference frame, not a direction vector, so translation should be applied to it.pull/5056/head
parent
9915e875bf
commit
9d76493ad8
|
@ -577,7 +577,7 @@ void PretransformVertices::Execute(aiScene *pScene) {
|
||||||
// multiply all properties of the camera with the absolute
|
// multiply all properties of the camera with the absolute
|
||||||
// transformation of the corresponding node
|
// transformation of the corresponding node
|
||||||
cam->mPosition = nd->mTransformation * cam->mPosition;
|
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;
|
cam->mUp = aiMatrix3x3(nd->mTransformation) * cam->mUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue