소스 검색

Copy view matrix

customisations
alemart 7 달 전
부모
커밋
81afc6af4b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      plugins/babylon-with-encantar.js

+ 1
- 1
plugins/babylon-with-encantar.js 파일 보기

355
         ar._camera._customViewMatrix = BABYLON.Matrix.Identity();
355
         ar._camera._customViewMatrix = BABYLON.Matrix.Identity();
356
         ar._camera._getViewMatrix = function() { return this._customViewMatrix; };
356
         ar._camera._getViewMatrix = function() { return this._customViewMatrix; };
357
         ar._camera.setViewMatrix = function(matrix) {
357
         ar._camera.setViewMatrix = function(matrix) {
358
-            this._customViewMatrix = matrix;
358
+            this._customViewMatrix.copyFrom(matrix);
359
             this.getViewMatrix(true);
359
             this.getViewMatrix(true);
360
             this.getWorldMatrix().decompose(undefined, this._tmpQuaternion, this.position);
360
             this.getWorldMatrix().decompose(undefined, this._tmpQuaternion, this.position);
361
             BABYLON.Axis.Y.rotateByQuaternionToRef(this._tmpQuaternion, this.upVector);
361
             BABYLON.Axis.Y.rotateByQuaternionToRef(this._tmpQuaternion, this.upVector);

Loading…
취소
저장