I want to plot in “real-time” a function related to the position of some objects in my application. So after a bit of googling and headaches I now know that I have manipulate individual vertex of an existing mesh. The problem is that, even though the order of vertex in “Edit Mode” tells me: 1,2,3,4… that order seems to be completely wrong in “Game Mode”.
I don’t know how to explain better so I created a simple example trying to plot a math.sin function in one side of my mesh. I have included a script to retrieve the vertex index inside “Edit Mode”. You have to press the Space Bar to see the plotting.
badMesh.blend (663 KB)