xzw 1 year ago
parent
commit
befdd31ba9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/navigation/FirstPersonControlsNew.js

+ 1 - 1
src/navigation/FirstPersonControlsNew.js

@@ -590,7 +590,7 @@ export class FirstPersonControls extends THREE.EventDispatcher {
                 let speed
                 let speed
                 let pano = viewer.images360.findNearestPano()
                 let pano = viewer.images360.findNearestPano()
                 if(!pano){
                 if(!pano){
-                    if(!viewer.bound)return
+                    if(!viewer.bound || viewer.bound.boundSize.x == 0)return
                     let boundFloor = viewer.bound.boundingBox.clone();
                     let boundFloor = viewer.bound.boundingBox.clone();
                     boundFloor.max.z = boundFloor.min.z
                     boundFloor.max.z = boundFloor.min.z
                     speed = boundFloor.distanceToPoint(viewer.mainViewport.view.position)
                     speed = boundFloor.distanceToPoint(viewer.mainViewport.view.position)