Is it possible to use FirstPersonView to look at a point? #5293
Unanswered
chrisgervang
asked this question in
Q&A
Replies: 1 comment
-
Check out https://math.gl/modules/web-mercator/docs/api-reference/web-mercator-utils#getdistancescalesviewport Once you have distance scales you can convert the long/lat deltas to meter deltas along X and Y axis. Assuming your elevation is in meters along Z axis you now just have to do the simple trigonometry to find out what you need. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I currently use the FirstPersonView to position the camera with geospatial coords and have it look towards a direction and orientation, as intended. I was wondering if there was a function to compute the pitch and bearing in the direction of at a particular lat/lng on the ground nearby?
Beta Was this translation helpful? Give feedback.
All reactions