# matrix_world not giving correct results

I have a plane which I rotated up 90 degrees on X and 45 degrees on Z. I run this code to get the vertices world location's:

import bpy

ob = bpy.context.object
verts = [i.co * ob.matrix_world for i in ob.data.vertices]
print(verts)


The results I should get should be something like:

-0.707, -0.707, -1
0.707, 0.707, -1
-0.707, -0.707, 1
0.707, 0.707, 1


-1.41, 7.1e-15, -1.19e-7
-1.19e-7, -1.06e-7, 1.41
1.19e-7, 1.06e-7, -1.41
1.41, -4.1e-15, 1.19e-7


What is going on here?

• Is your plane at the origin (0,0,0)? – David May 30 '15 at 13:36
• yes , it is @David – BlendingJake May 30 '15 at 13:41

to multiply Matrix with Vector, order is important:

v2 = matrix * vector

• that was it, thanks. I don't know why they don't make that a little more apparent though. – BlendingJake May 30 '15 at 13:55
• for a brief period in 2.5 series vector * matrix was valid, but it was changed to the algebraically more conventional matrix indexing, which made it m*v in 2.62 ( blenderartists.org/forum/… ) – zeffii May 30 '15 at 20:51