本文整理汇总了Python中AvatarInputHandler.cameras.FovExtended.calcHorizontalFov方法的典型用法代码示例。如果您正苦于以下问题:Python FovExtended.calcHorizontalFov方法的具体用法?Python FovExtended.calcHorizontalFov怎么用?Python FovExtended.calcHorizontalFov使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AvatarInputHandler.cameras.FovExtended
的用法示例。
在下文中一共展示了FovExtended.calcHorizontalFov方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onEnterWorld
# 需要导入模块: from AvatarInputHandler.cameras import FovExtended [as 别名]
# 或者: from AvatarInputHandler.cameras.FovExtended import calcHorizontalFov [as 别名]
def onEnterWorld(self, prereqs):
if self.isPlayerVehicle:
global yaw, old_yaw, pitch, old_pitch, old_multiplier, dataHor, dataVert, turretYawLimits, scaleHor, scaleVert
global minStep, maxPitch, minPitch, currentStep, minBound, maxBound, screenHeight, screenWidth, player
global old_gunAnglesPacked, isAlive, cameraMode
player = BigWorld.player()
yaw = 0.0
pitch = 0.0
old_multiplier = 1.0
old_gunAnglesPacked = None
old_yaw = None
old_pitch = None
isAlive = self.isAlive
screenHeight = BigWorld.screenHeight()
screenWidth = BigWorld.screenWidth()
currentStep = STEP
verticalFov = FovExtended.instance().actualDefaultVerticalFov
horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
gun = self.typeDescriptor.gun
minBound, maxBound = gun['pitchLimits']['absolute']
minStep = (maxBound - minBound) / 63
turretYawLimits = gun['turretYawLimits']
maxPitch =gun['pitchLimits']['maxPitch']
minPitch = gun['pitchLimits']['minPitch']
dataHor, dataVert = coordinate(yaw, pitch)
cameraMode = None
as_event('ON_ANGLES_AIMING')
示例2: StrategicAimingSystem_enable
# 需要导入模块: from AvatarInputHandler.cameras import FovExtended [as 别名]
# 或者: from AvatarInputHandler.cameras.FovExtended import calcHorizontalFov [as 别名]
def StrategicAimingSystem_enable(self, targetPos):
global dataHor, dataVert, scaleHor, scaleVert, yHor, yVert, cameraMode
verticalFov = FovExtended.instance().actualDefaultVerticalFov
horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
yHor = 0
yVert = 0
scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
dataHor, dataVert = coordinate(yaw, pitch)
cameraMode = 'str'
as_event('ON_ANGLES_AIMING')
示例3: ArcadeAimingSystem_enable
# 需要导入模块: from AvatarInputHandler.cameras import FovExtended [as 别名]
# 或者: from AvatarInputHandler.cameras.FovExtended import calcHorizontalFov [as 别名]
def ArcadeAimingSystem_enable(self, targetPos, turretYaw=None, gunPitch=None):
global dataHor, dataVert, scaleHor, scaleVert, yHor, yVert, cameraMode
verticalFov = FovExtended.instance().actualDefaultVerticalFov
horizontalFov = FovExtended.calcHorizontalFov(verticalFov)
yHor = - screenHeight * 0.0775
yVert = yHor
scaleHor = screenWidth / horizontalFov if horizontalFov else screenWidth
scaleVert = screenHeight / verticalFov if verticalFov else screenHeight
dataHor, dataVert = coordinate(yaw, pitch)
cameraMode = 'arc'
as_event('ON_ANGLES_AIMING')