|
setNormalsetNormal(nor)sets the normal vector of the vertex.nor: Type: List
[ nx, ny, nz]
nx = cosine of the
normal to the world x-axis
Type:
float
ny = cosine of the
normal to the world y-axis
Type:
float
nz = cosine of the
normal to the world z-axis
Type: float
Sample Code# get controllercontroller = GameLogic.getCurrentController()# get object the controller is attached toobj = controller.owner# get the 1st meshmesh = obj.meshes[0]# get the first vertex of the first materialvert = mesh.getVertex( 0, 0)# set the vertex normal vectorvert.setNormal([0.0, 0.0, -1.0]) |