Ejemplo n.º 1
0
 def getThirdPersonShotPoint(self):
     if self.__shotPointCalculator is not None:
         return self.__shotPointCalculator.aimPlane.intersectRay(
             *self.__getScanRay())
     else:
         return AimingSystems.getDesiredShotPoint(*self.__getScanRay())
         return
 def getDesiredShotPoint(self):
     start = self._matrix.translation
     scanDir = self._matrix.applyVector(Vector3(0.0, 0.0, 1.0))
     shotDistance = self._vehicleTypeDescriptor.shot.maxDistance
     return AimingSystems.getDesiredShotPoint(start,
                                              scanDir,
                                              shotDistance=shotDistance)
Ejemplo n.º 3
0
 def getThirdPersonShotPoint(self):
     if self.__worldSpaceAimingWithLimits.isEnabled:
         return self.__worldSpaceAimingWithLimits.getAimPoint()
     elif self.__shotPointCalculator is not None:
         return self.__shotPointCalculator.aimPlane.intersectRay(*self.__getScanRay())
     else:
         shotDistance = self._vehicleTypeDescriptor.shot.maxDistance if self._vehicleTypeDescriptor else 10000.0
         return AimingSystems.getDesiredShotPoint(shotDistance=shotDistance, *self.__getScanRay())
Ejemplo n.º 4
0
 def processHover(self, position, force = False):
     if force:
         position = AimingSystems.getDesiredShotPoint(Math.Vector3(position[0], 500.0, position[2]), Math.Vector3(0.0, -1.0, 0.0), True, True, True)
         self.__marker.setPosition(position)
         BigWorld.callback(SERVER_TICK_LENGTH, self.__markerForceUpdate)
     else:
         self.__marker.update(position, Vector3(0, 0, 1), 10, SERVER_TICK_LENGTH, None)
     self.hitPosition = position
     self.writeStateToReplay()
     return
Ejemplo n.º 5
0
 def getDesiredShotPoint(self, scanStart, scanDir):
     scanPos, isPointConvenient = self.__testMouseTargetPoint(scanStart, scanDir)
     if isPointConvenient:
         return scanPos
     planePos = self.__aimPlane.intersectRay(scanStart, scanDir)
     if scanStart.distSqrTo(planePos) < scanStart.distSqrTo(scanPos):
         return scanPos
     turretYaw, gunPitch = AimingSystems.getTurretYawGunPitch(self.__vehicleDesc, self.__vehicleMat, planePos, True)
     gunMat = AimingSystems.getGunJointMat(self.__vehicleDesc, self.__getTurretMat(turretYaw), gunPitch)
     aimDir = gunMat.applyVector(Vector3(0.0, 0.0, 1.0))
     return AimingSystems.getDesiredShotPoint(gunMat.translation, aimDir)
Ejemplo n.º 6
0
 def processHover(self, position, force=False):
     if force:
         position = AimingSystems.getDesiredShotPoint(
             Math.Vector3(position[0], 500.0, position[2]),
             Math.Vector3(0.0, -1.0, 0.0), True, True, True)
         self.__marker.setPosition(position)
         BigWorld.callback(SERVER_TICK_LENGTH, self.__markerForceUpdate)
     else:
         self.__marker.update(position, Vector3(0, 0, 1), 10,
                              SERVER_TICK_LENGTH, None)
     self.hitPosition = position
     self.writeStateToReplay()
Ejemplo n.º 7
0
 def getDesiredShotPoint(self, terrainOnlyCheck = False):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation, Vector3(0, -1, 0), True, True, terrainOnlyCheck)
Ejemplo n.º 8
0
 def getThirdPersonShotPoint(self):
     return AimingSystems.getDesiredShotPoint(*self.__getScanRay())
Ejemplo n.º 9
0
 def getDesiredShotPoint(self):
     start = self._matrix.translation
     scanDir = self._matrix.applyVector(Vector3(0.0, 0.0, 1.0))
     return AimingSystems.getDesiredShotPoint(start, scanDir)
Ejemplo n.º 10
0
 def getThirdPersonShotPoint(self):
     if self.__shotPointCalculator is not None:
         return self.__shotPointCalculator.aimPlane.intersectRay(*self.__getScanRay())
     else:
         return AimingSystems.getDesiredShotPoint(*self.__getScanRay())
         return
Ejemplo n.º 11
0
 def getDesiredShotPoint(self):
     start = self._matrix.translation
     scanDir = self._matrix.applyVector(Vector3(0.0, 0.0, 1.0))
     return AimingSystems.getDesiredShotPoint(start, scanDir)
Ejemplo n.º 12
0
 def getDesiredShotPoint(self):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation, Vector3(0, -1, 0), True, True)
Ejemplo n.º 13
0
 def getDesiredShotPoint(self, terrainOnlyCheck=False):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation,
                                              Vector3(0, -1, 0), True, True,
                                              terrainOnlyCheck)
Ejemplo n.º 14
0
 def getDesiredShotPoint(self):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation, Vector3(0, -1, 0), True, True)
Ejemplo n.º 15
0
 def getThirdPersonShotPoint(self):
     return AimingSystems.getDesiredShotPoint(*self.__getScanRay())