Reputation: 96976
Given a three.js scene, how does one calculate the theta
and phi
polar coordinates from the x, y and z position
and rotation
property values of a THREE.PerspectiveCamera
?
Upvotes: 1
Views: 1487
Reputation: 5572
You just need to take your x
, y
, and z
coordinates and plug them into the following equations:
Source: https://en.wikipedia.org/wiki/Spherical_coordinate_system
Upvotes: 4