I found a solution that is almost perfect:
I create 2 vars using the fov formula:
var hfov = Math.atan2(view.mouseX*2, camera.zoom*camera.zoom + (-
view.mouseX*view.mouseX)/(camera.zoom*camera.zoom))*toDEGREES;
var vfov = Math.atan2(view.mouseY*2, camera.zoom*camera.zoom + (-
view.mouseY*view.mouseY)/(camera.zoom*camera.zoom))*toDEGREES;

var hAngle= hfov/2;
var vAngle = vfov/2;

hAngle works perfect but there is a problem with vAngle

as long as the mouse moves in the center so the mouseX is 0 the vAngle
is perfect but when the mouseX moves the vAngle becomes begger than it
should, the further the mouseX is from the center the bigger vAngle
becomes, I also noticed that if I move the mouse horizontally at y !=
0 then an object driven by the vAngle moves like on a circle

I guess vAngle needs some sort of correction, ot vfov different values
for mouseY that would take into an account the mouseX movement

I would appreciate any help

Reply via email to