소스 검색

World center needs to be reset as well.

Raanan Weber 7 년 전
부모
커밋
7a5fc07cbd
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/babylon.scene.ts

+ 2 - 0
src/babylon.scene.ts

@@ -4662,8 +4662,10 @@
 
                 var camera: TargetCamera;
                 var radius = worldSize.length() * 1.5;
+                // empty scene scenario!
                 if (!isFinite(radius)) {
                     radius = 1;
+                    worldCenter.copyFromFloats(0, 0, 0);
                 }
                 if (createArcRotateCamera) {
                     var arcRotateCamera = new ArcRotateCamera("default camera", -(Math.PI / 2), Math.PI / 2, radius, worldCenter, this);