[#20446] mathutils: bugfix for matrix * matrix - patch by Paul Parchenko (parfoure) thanks
From the tracker: - typo was making the multiplication to transpose resulting matrix eg #### from Mathutils import * from math import radians cont = GameLogic.getCurrentController() owner = cont.owner owner.worldOrientation = RotationMatrix(radians(1), 3, 'z') * owner.worldOrientation ####
This commit is contained in:
@@ -944,7 +944,7 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2)
|
||||
for(z = 0; z < mat1->rowSize; z++) {
|
||||
dot += (mat1->matrix[z][y] * mat2->matrix[x][z]);
|
||||
}
|
||||
mat[((x * mat1->colSize) + y)] = (float)dot;
|
||||
mat[((y * mat1->rowSize) + x)] = (float)dot;
|
||||
dot = 0.0f;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user