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);
|
this.phi = Math.asin(forward.z);
|
||||||
|
|
||||||
// Don't know why this line works... But thanks Thierry-san because
|
// Don't know why this line works... But thanks Thierry-san and
|
||||||
// it seems to work...
|
// Bastien because it seems to work...
|
||||||
this.theta = Math.atan(forward.y / forward.x) + Math.PI;
|
this.theta = Math.atan2(forward.y, forward.x);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue