How to get mesh of converted curve in blender game

(BigEfrom84) #1

I have converted a nurbs path to a meshed object. How do i retrieve the vertices of this object. Here is what i have so far:

`import bge

def main():

cont = bge.logic.getCurrentController()
scene = bge.logic.getCurrentScene()

curvePath = scene.objects['NurbsPath']
mesh = curvePath.meshes[0]
print("Mesh ",mesh)
print("Materials ",mesh.materials)

length = mesh.getVertexArrayLength(0)
print("Array length ",length)


This returns zero length for the vertex array, and zero materials.

How do i retrieve the vertices of the converted curve

(Cotaks) #2

Your code is good, nothing wrong with it, so it should be the nurbs path/mesh that is incorrect, sadly i have no exp. with curve paths. but nonetheless the code is 100% correct to get the vertexes.