First thing I see is that you shouldn't read the quaternion in reverse order.First thing I see is that you shouldn't read the quaternion in reverse order.
Also you shouldn't use glm::mix
, use glm::slerp
instead.
And here is how I construct the bone transform:
mat = glm::mat4_cast( currentrotation );
mat[0][0] *= currentscale.x; mat[1][0] *= currentscale.x; mat[2][0] *= currentscale.x;
mat[0][1] *= currentscale.y; mat[1][1] *= currentscale.y; mat[2][1] *= currentscale.y;
mat[0][2] *= currentscale.z; mat[1][2] *= currentscale.z; mat[2][2] *= currentscale.z;
mat[0][3] = currentposition.x; mat[1][3] = currentposition.y; mat[2][3] = currentposition.z;
Also I would check all my matrix multiplication, it should be in reverse order to how would you do it with Assimp matrices.
I base all this on personal experience from implementing an animated mesh with assimp and glm myself.(which now works) But it might not be the correct way of doing things.