mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 03:14:00 +00:00
fix(camera): orbit on drags from the stars above 1,000 km
Below Cesium's trackball height (7,500 km by default) a drag that starts on the stars turns the camera in place, whatever enableLook says, which was the drag path to a view with no planet in it. Lower that height to the free-look height with the free-look limit, never raising it, and restore it on dispose. Above 1,000 km such a drag now orbits the globe, as it already did above 7,500 km, at a similar rate, and a tilt drag from the stars there tilts about the planet's edge or does nothing instead of turning the camera. Drags that start on the planet are unchanged.
This commit is contained in:
1 parent
64377db91a
commit
2f9d13f39d
3 files changed
+38
-11
No files matched your search
@@ -67,7 +67,10 @@ the real browser controller at desktop and phone widths with keyless fixtures.
|
||||
|
||||
Cesium's free look (Shift+drag, which turns the camera in place) works only
|
||||
below 1,000 km. Above that height a few drags could turn the whole planet out of
|
||||
frame and leave only stars, so Shift+drag does nothing there. Orbit, tilt and
|
||||
frame and leave only stars, so Shift+drag does nothing there. Cesium also
|
||||
turns the camera in place for a drag that starts on the stars below its
|
||||
trackball height (7,500 km by default); that height is lowered to 1,000 km, so
|
||||
such a drag orbits the globe above it, as it does higher up. Orbit, tilt and
|
||||
zoom are unchanged at every height. How much of the frame shows the planet's
|
||||
surface is measured by casting a 32×18 grid of view rays at the ellipsoid; while
|
||||
the scope mask is on (the default) only the rays inside its keyhole count, since
|
||||
@@ -96,9 +99,7 @@ rest, and gives up five minutes after the camera last moved. Limb glow, and a
|
||||
surface sliver up to about one grid cell thick (some 50 px on a 900 px tall
|
||||
frame), can count as out of view. The zoom-out guard above keeps wheel and
|
||||
pinch zoom-outs in view; this catches the other ways a move can end looking
|
||||
away, such as a saved or shared view that did, or a drag
|
||||
that Cesium turns into an in-place look below its 7,500 km trackball height (one
|
||||
that starts on the stars, or a tilt drag with the screen centre off the planet).
|
||||
away, such as a saved or shared view that did.
|
||||
Views with more surface than that, such as the oblique orbital Director shots,
|
||||
are left as they are, and so are tracked or locked cameras, a camera flight in
|
||||
progress, a Director scene while it plays (holds included) and the 2D and
|
||||
|
||||
Reference in new issue
Block a user