diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2009-12-22 10:27:53 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2009-12-22 10:27:53 +0300 |
commit | 9c22e846feba9b51ad2163a36906b0e503326476 (patch) | |
tree | 1c57cf1bd504264501cfcd2e1acb42e037660202 /source | |
parent | 5bdcb2dff27e5c52c33728d09152178120009e0c (diff) |
[#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
####
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/generic/matrix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c index a1ef4b53615..1fc5018c854 100644 --- a/source/blender/python/generic/matrix.c +++ b/source/blender/python/generic/matrix.c @@ -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; } } |