UV
UV
gets/sets the UV coordinates for this vertex
Type:
List [ ux, uy]
float values
Sample Code
###### get the vertex UV coordinates
# get controller
controller = GameLogic.getCurrentController()
# get object the controller is attached to
obj = controller.owner
# get the 1st mesh
mesh = obj.meshes[0]
# get the first vertex of the first material
vert = mesh.getVertex( 0, 0)
# get UV coordinates for this vertex
uv = vert.UV
###### set the vertex UV coordinates
# get controller
controller = GameLogic.getCurrentController()
# get object the controller is attached to
obj = controller.owner
# get the 1st mesh
mesh = obj.meshes[0]
# get the first vertex of the first material
vert = mesh.getVertex( 0, 0)
# set the UV coordinates for this vertex
vert.UV = [ 1.0, 1.0]
|