Bläddra i källkod

Copy view matrix

customisations
alemart 8 månader sedan
förälder
incheckning
81afc6af4b
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      plugins/babylon-with-encantar.js

+ 1
- 1
plugins/babylon-with-encantar.js Visa fil

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);

Laddar…
Avbryt
Spara