Browse Source

fixed arcRotateCamera target position - using absolute position now

Nicolai Pascal Großer 9 năm trước cách đây
mục cha
commit
d79c8f1ba1

+ 1 - 1
src/Cameras/babylon.arcRotateCamera.js

@@ -102,7 +102,7 @@ var BABYLON;
             configurable: true
         });
         ArcRotateCamera.prototype._getTargetPosition = function () {
-            return this.target.position || this.target;
+            return this.target.getAbsolutePosition() || this.target;
         };
         // Cache
         ArcRotateCamera.prototype._initCache = function () {

+ 1 - 1
src/Cameras/babylon.arcRotateCamera.ts

@@ -89,7 +89,7 @@
         }
 
         public _getTargetPosition(): Vector3 {
-            return this.target.position || this.target;
+            return this.target.getAbsolutePosition() || this.target;
         }
 
         // Cache