y
y
gets/sets the y position of the vertex using local coordinates
(distance from the object center).
Type: float
Sample Code
###### get the vertex y position
# 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 y position of the vertex
y_pos = vert.y
###### set the vertex y position
# 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 the y position of this vertex
vert.y = 1.0
|