mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Open the cockpit on a tracked Navara aircraft
This commit is contained in:
1 parent
8b179a7e01
commit
2087b55b47
19 files changed
+142
-65
No files matched your search
@@ -45,7 +45,7 @@ export function update() {
|
||||
if (
|
||||
!info ||
|
||||
!this.trackedEntity ||
|
||||
!this.viewer.entities.contains(this.trackedEntity)
|
||||
!this.host.contains(this.trackedEntity)
|
||||
) {
|
||||
if (nowMs < this.contextNavigationDeadlineMs) return;
|
||||
this.exit({ restoreTracking: false });
|
||||
@@ -61,8 +61,8 @@ export function update() {
|
||||
return;
|
||||
this.lastCameraUpdateMs = nowMs;
|
||||
|
||||
const target = this.trackedEntity.position.getValue(
|
||||
this.viewer.clock.currentTime,
|
||||
const target = this.host.position(
|
||||
this.trackedEntity,
|
||||
this.scratchTarget,
|
||||
);
|
||||
if (!target) return;
|
||||
@@ -182,8 +182,8 @@ export function update() {
|
||||
)
|
||||
) {
|
||||
this.lastGroundProbeMs = nowMs;
|
||||
const viewerCartographic = this.viewer.camera.positionCartographic;
|
||||
this.services.sampleMeshFloorCells(this.viewer.scene, groundPoint, {
|
||||
const viewerCartographic = this.host.cartographic();
|
||||
this.services.sampleMeshFloorCells(this.host.surface, groundPoint, {
|
||||
excludeObjects: [this.trackedEntity],
|
||||
viewerLat: geo.math.toDegrees(viewerCartographic.latitude),
|
||||
viewerLon: geo.math.toDegrees(viewerCartographic.longitude),
|
||||
@@ -345,7 +345,7 @@ export function update() {
|
||||
}
|
||||
}
|
||||
|
||||
this.viewer.camera.setView({
|
||||
this.host.camera.setView({
|
||||
destination: this.scratchCamera,
|
||||
orientation: { direction: this.scratchForward, up: this.scratchUp },
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user