예제 #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)
예제 #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())
예제 #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
예제 #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)
예제 #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()
예제 #7
0
 def getDesiredShotPoint(self, terrainOnlyCheck = False):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation, Vector3(0, -1, 0), True, True, terrainOnlyCheck)
예제 #8
0
 def getThirdPersonShotPoint(self):
     return AimingSystems.getDesiredShotPoint(*self.__getScanRay())
 def getDesiredShotPoint(self):
     start = self._matrix.translation
     scanDir = self._matrix.applyVector(Vector3(0.0, 0.0, 1.0))
     return AimingSystems.getDesiredShotPoint(start, scanDir)
예제 #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
예제 #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)
예제 #12
0
 def getDesiredShotPoint(self):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation, Vector3(0, -1, 0), True, True)
 def getDesiredShotPoint(self, terrainOnlyCheck=False):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation,
                                              Vector3(0, -1, 0), True, True,
                                              terrainOnlyCheck)
예제 #14
0
 def getDesiredShotPoint(self):
     return AimingSystems.getDesiredShotPoint(self._matrix.translation, Vector3(0, -1, 0), True, True)
예제 #15
0
 def getThirdPersonShotPoint(self):
     return AimingSystems.getDesiredShotPoint(*self.__getScanRay())