Poly Proxy: v1

v1
  • Returns the Mesh Vertex index number of the 1st Polygon Vertex.

Return Type:

  • integer
    Sample Code

    ############################# get mesh vertex index number of 1st polygon vertex

    # import bge
    import bge

    # get the current controller
    cont = bge.logic.getCurrentController()

    # get object that owns this controller
    obj = cont.owner
     
    # Get a list of the mesh
    meshList = obj.meshes

    # Get the first mesh on the object
    mesh = meshList[0]
     
    # get the first polygon on the mesh
    poly = mesh.getPolygon(0)

    # get the mesh vertex index of the 1st poly vertex
    vertIndex = poly.v1