Calculate WrapAngle(angle) in advance
This commit is contained in:
parent
344ee7c867
commit
6abc7338e2
1 changed files with 3 additions and 1 deletions
|
@ -540,7 +540,9 @@ def ConvertFlashRotation(rotY, rotZ, X, Y, FOV=math.tan(2*math.pi/9.0)):
|
||||||
return WrapAngle(theta)
|
return WrapAngle(theta)
|
||||||
X = 2*X-1
|
X = 2*X-1
|
||||||
Y = 2*Y-1
|
Y = 2*Y-1
|
||||||
if WrapAngle(rotY) in (0, 180) or WrapAngle(rotZ) in (0, 180):
|
rotY = WrapAngle(rotY)
|
||||||
|
rotZ = WrapAngle(rotZ)
|
||||||
|
if rotY in (0, 180) or rotZ in (0, 180):
|
||||||
outX = 0
|
outX = 0
|
||||||
outY = -rotY # Positive value means clockwise in Flash
|
outY = -rotY # Positive value means clockwise in Flash
|
||||||
outZ = -rotZ
|
outZ = -rotZ
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue