world_to_camera_view incorrectly centering on object When I plot points of a mesh to 2d using bpy_extras.object_utils.world_to_camera_view the object is centered to the camera. However the actual camera in 3d mode the objects are not centered.

An image is probably the best way to illustrate what I was expecting versus the results I am getting (see below).

Is there anyway to get these meshes off center as the camera actually sees them?

Expected:



Actual:



I don't know if my python code is to blame.. here it is:

..snip.. (for each vector of each mesh)
blenderVertexIndex = bpy.data.objects[obj.name].data.polygons[indexFace].vertices[indexVector]
coordinate3D = bpy.data.objects[obj.name].data.vertices[blenderVertexIndex].co * obj.matrix_world
coordinate2D = bpy_extras.object_utils.world_to_camera_view(bpy.context.scene, bpy.data.objects["Camera"], coordinate3D)
There may be another issue here, but at least the matrix-vector multiplication order from object to world space is wrong, it should be the other way around:

coordinate3D = obj.matrix_world * bpy.data.objects[obj.name].data.vertices[blenderVertexIndex].co