Преглед на файлове

Setting default target

The loader is setting the target after the view matrix is being generated. target is needed at this time already.
Will fix the loader problem.
Raanan Weber преди 10 години
родител
ревизия
4cda16f7cb
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      Babylon/Cameras/babylon.arcRotateCamera.ts

+ 5 - 1
Babylon/Cameras/babylon.arcRotateCamera.ts

@@ -54,6 +54,10 @@
         constructor(name: string, public alpha: number, public beta: number, public radius: number, public target: any, scene: Scene) {
             super(name, BABYLON.Vector3.Zero(), scene);
 
+	    if(!this.target) {
+            	this.target = Vector3.Zero();
+            }
+
             this.getViewMatrix();
         }
 
@@ -485,4 +489,4 @@
             this.maxZ = distance * 2;
         }
     }
-} 
+}