…as the title say, is there an way to get Worldposition of an vertex in an object using python?
if so what functions can i use to do this?
…and where can i find it in the blender/python api?
…as the title say, is there an way to get Worldposition of an vertex in an object using python?
if so what functions can i use to do this?
…and where can i find it in the blender/python api?
If the local coordinates of the vertex are known you can use something like this:
from bge import logic as GL
from mathutils import Vector
objs = GL.getCurrentScene().objects
obj = objs['Cube']
x, y, z = 1., 1., 1. # local vertex coords
P = Vector([x, y, z])
M = obj.worldOrientation
globCoords = obj.worldPosition + M*P; # global vertex coords
print(globCoords)
(Compare the results with the global coordinates of the vertex as given in the transform panel, in edit mode).
Or multiply it by the world transform
World pos= obj.worldTransform * pos