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)
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())
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
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)
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()
def getDesiredShotPoint(self, terrainOnlyCheck = False): return AimingSystems.getDesiredShotPoint(self._matrix.translation, Vector3(0, -1, 0), True, True, terrainOnlyCheck)
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)
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): 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)