Hi,
Is it possible, in realtime, to draw polygons between points, e.g. a triangle between three points?
If not, could a function be written in blender’s game engine module to do that, and if so, how? Many thanks, 1/1 credit(s)
Hi,
Is it possible, in realtime, to draw polygons between points, e.g. a triangle between three points?
If not, could a function be written in blender’s game engine module to do that, and if so, how? Many thanks, 1/1 credit(s)
It is possible, but not particularly easily. Here’s how to do so:
cont = logic.getCurrentController()
obj = cont.owner
mesh = obj.meshes[0]
for v in mesh.getVertexArrayLength()
vert = mesh.getVertex(0, v)
vert.setXYZ(list[v].position[0], list[v].position[1], list[v].position[2])
in the triangle to lock the individual vertices of the triangle to the positions of the objects passed in the list you created earlier. I haven’t tested it yet, though…