Changed to atan2
This commit is contained in:
parent
729aaa09c2
commit
ed5df6949c
|
@ -68,9 +68,9 @@ PointerCamera.prototype.update = function() {
|
|||
|
||||
this.phi = Math.asin(forward.z);
|
||||
|
||||
// Don't know why this line works... But thanks Thierry-san because
|
||||
// it seems to work...
|
||||
this.theta = Math.atan(forward.y / forward.x) + Math.PI;
|
||||
// Don't know why this line works... But thanks Thierry-san and
|
||||
// Bastien because it seems to work...
|
||||
this.theta = Math.atan2(forward.y, forward.x);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue