Sfoglia il codice sorgente

Copy view matrix

customisations
alemart 8 mesi fa
parent
commit
81afc6af4b
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      plugins/babylon-with-encantar.js

+ 1
- 1
plugins/babylon-with-encantar.js Vedi File

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

Loading…
Annulla
Salva