mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 05:42:22 +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))
|
? lookTilt(orbitalLookReadoutParts(state.lookTarget))
|
||||||
: null;
|
: null;
|
||||||
const swathScale = offset ? offNadirSwathScale(tilt) : 1;
|
const swathScale = offset ? offNadirSwathScale(tilt) : 1;
|
||||||
// Tilted past the limb, the view's centre looks into space: no swath.
|
// Tilted past the limb, the view's centre looks into space: no swath. The
|
||||||
const seesEarth = !offset || offNadirCentreMeetsEarth(info.altitudeM, tilt);
|
// 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({
|
this.publishOrbital({
|
||||||
name: info.name,
|
name: info.name,
|
||||||
classLabel: info.classLabel || '',
|
classLabel: info.classLabel || '',
|
||||||
|
|||||||
Reference in new issue
Block a user