def animate(): pbge.update() # and rotation of objects pbge.rotateZ(pbge.myplane, 0.001) pbge.rotateX(pbge.mycube, 0.01) pbge.rotateY(pbge.mysphere, 0.02) pbge.rotateY(pbge.mycylinder, 0.03)
def animate(): pbge.update() # and rotation of objects pbge.rotateZ( pbge.myplane, 0.001 ) pbge.rotateX( pbge.mycube, 0.01 ) pbge.rotateY( pbge.mysphere, 0.02 ) pbge.rotateY( pbge.mycylinder, 0.03 )
def init(): scene = bge.logic.getCurrentScene() scene.post_draw = [animate] pbge.configure() # getting the reference of the created objects # for further modifications myplane = pbge.createPlane( -2,0,0 ) mycube = pbge.createCube( 0,2,0 ) mysphere = pbge.createSphere( 0,-2,0 ) mycylinder = pbge.createCylinder( 2,0,0 ) #let's place a spot myspot = pbge.createSpot( 0,0,7 ) # all objects are created, # let's change the position: pbge.moveTo( myplane, 0,0,-3 ) # let's change the size: pbge.scale( myplane, 10 ) pbge.scaleZ( mycube, 3 ) # let's change the orientation: pbge.rotateX( mycylinder, 15 )