|
getVertexgetVertex(matID, array)Returns the vertexReturn type: KX_VertexProxy matID: Type:
integer
0 = 1st material on mesh
1 = 2nd material on mesh etc, etc, etc array: Type:
integer
0 = 1st vertex in array
1 = 2nd vertex in array etc, etc, etc Sample Code# get controllercontroller = GameLogic.getCurrentController()# get object the controller is attached toobj = controller.owner# get the 1st meshmesh = obj.meshes[0]# get first materialmatID = 0# get array length of the materiallength = mesh.getVertexArrayLength(matID)# loop through arrayfor array in range( 0, length):# get vertexvert = mesh.getVertex(matID,array)#Change the colorcolor = [1.0, 0.0, 1.0, 1.0]# change vertex colorvert.setRGBA(color) |