Example #1
0
 def __createMotors(self):
     del self.__motors[:]
     for i in xrange(self.modelCount):
         motor = BigWorld.LinearHomer()
         self.__motors.append(motor)
         motorMatrix = Math.Matrix()
         motorMatrix.setIdentity()
         motor.target = motorMatrix
         motor.acceleration = 0
         motor.proximity = 0.5
Example #2
0
 def __init__(self, beginExplosionPos, endExplosionPos, areaWidth, velocity):
     CallbackDelayer.__init__(self)
     self.model = BigWorld.Model('helpers/models/unit_cube.model')
     BigWorld.addModel(self.model)
     self.model.position = beginExplosionPos
     linearHomer = BigWorld.LinearHomer()
     self.model.addMotor(linearHomer)
     linearHomer.align = math_utils.createSRTMatrix((areaWidth, 5, 1), (0.0, 0, 0), Vector3(0, 0, 0))
     linearHomer.acceleration = 0
     linearHomer.velocity = velocity
     linearHomer.target = math_utils.createTranslationMatrix(endExplosionPos)
     linearHomer.proximityCallback = self.__onDeath