浏览代码

Merge pull request #879 from npgrosser/master

fixed arcRotateCamera target position - using absolute position now
David Catuhe 9 年之前
父节点
当前提交
f0fa0831c1
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/Cameras/babylon.arcRotateCamera.js
  2. 1 1
      src/Cameras/babylon.arcRotateCamera.ts

+ 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.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.getAbsolutePosition() : this.target;
         }
 
         // Cache