mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-09 04:44:01 +00:00
fix(cockpit): the swath waits for the eased view to reach the Earth, not only the look target
This commit is contained in:
1 parent
85d0f84066
commit
e968233a52
1 file changed
+10
-2
@@ -415,8 +415,16 @@ export function publishOrbitalView(info, transition = IDLE_TRANSITION) {
|
||||
? lookTilt(orbitalLookReadoutParts(state.lookTarget))
|
||||
: null;
|
||||
const swathScale = offset ? offNadirSwathScale(tilt) : 1;
|
||||
// Tilted past the limb, the view's centre looks into space: no swath.
|
||||
const seesEarth = !offset || offNadirCentreMeetsEarth(info.altitudeM, tilt);
|
||||
// Tilted past the limb, the view's centre looks into space: no swath. The
|
||||
// camera eases toward the target, so both must meet the Earth; the HUD
|
||||
// republishes on its cadence, so the swath appears once the view arrives.
|
||||
const seesEarth =
|
||||
!offset ||
|
||||
(offNadirCentreMeetsEarth(info.altitudeM, tilt) &&
|
||||
offNadirCentreMeetsEarth(info.altitudeM, {
|
||||
northDeg: state.lookView?.pitchDeg ?? 0,
|
||||
eastDeg: state.lookView?.yawDeg ?? 0,
|
||||
}));
|
||||
this.publishOrbital({
|
||||
name: info.name,
|
||||
classLabel: info.classLabel || '',
|
||||
|
||||
Reference in new issue
Block a user