|
|
@@ -704,6 +704,8 @@ function mouseEventToCoords(event) { |
|
|
|
var root = Math.sqrt(x*x + a*a); |
|
|
|
var pitch = Math.atan((y * c + focal * s) / root) * 180 / Math.PI; |
|
|
|
var yaw = Math.atan2(x / root, a / root) * 180 / Math.PI + config.yaw; |
|
|
|
if (yaw < -180) yaw += 360; |
|
|
|
if (yaw > 180) yaw -= 360; |
|
|
|
return [pitch, yaw]; |
|
|
|
} |
|
|
|
|
|
|
|