damit niemand den selben fehler macht wie ich...
beim laden eines models mit assim bezüglich der transformationsmatrizen folgendes beachten:
Code:
aiMatrix4x4 matrix = node->mTransformation;
/*
// THIS IS THE WRONG WAY
m_matrix = glm::mat4(
matrix.a1, matrix.a2, matrix.a3, matrix.a4,
matrix.b1, matrix.b2, matrix.b3, matrix.b4,
matrix.c1, matrix.c2, matrix.c3, matrix.c4,
matrix.d1, matrix.d2, matrix.d3, matrix.d4
);
*/
// THIS IS THE RIGHT WAY
m_matrix = glm::mat4(
matrix.a1, matrix.b1, matrix.c1, matrix.d1,
matrix.a2, matrix.b2, matrix.c2, matrix.d2,
matrix.a3, matrix.b3, matrix.c3, matrix.d3,
matrix.a4, matrix.b4, matrix.c4, matrix.d4
);
ist ziemlich ärgerlich, wenn man es (wie ich) falsch macht und dann ziemlich lange braucht, bis man draufkommt
Bookmarks