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