Przeglądaj źródła

better arcrotatecamera constructor

David Catuhe 8 lat temu
rodzic
commit
8fd448f5c5
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      src/Cameras/babylon.arcRotateCamera.ts

+ 2 - 3
src/Cameras/babylon.arcRotateCamera.ts

@@ -210,9 +210,8 @@ module BABYLON {
         constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene) {
             super(name, Vector3.Zero(), scene);
 
-            if (!target) {
-                this._target = Vector3.Zero();
-            } else {
+            this._target = Vector3.Zero();
+            if (target) {
                 this.setTarget(target);
             }