소스 검색

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