فهرست منبع

Merge pull request #630 from jackcaron/BlenderQuaternions

Blender quaternions
David Catuhe 10 سال پیش
والد
کامیت
922885fb03
2فایلهای تغییر یافته به همراه400 افزوده شده و 342 حذف شده
  1. 394 341
      Exporters/Blender/io_export_babylon.py
  2. 6 1
      src/Loading/Plugins/babylon.babylonFileLoader.ts

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 394 - 341
Exporters/Blender/io_export_babylon.py


+ 6 - 1
src/Loading/Plugins/babylon.babylonFileLoader.ts

@@ -478,7 +478,12 @@
                 camera.target = BABYLON.Vector3.FromArray(parsedCamera.target);
             }
         } else {
-            camera.rotation = BABYLON.Vector3.FromArray(parsedCamera.rotation);
+            if (parsedCamera.rotationQuaternion) {
+                camera.rotationQuaternion = BABYLON.Quaternion.FromArray(parsedCamera.rotationQuaternion);
+            }
+            else {
+                camera.rotation = BABYLON.Vector3.FromArray(parsedCamera.rotation);
+            }
         }
 
         camera.fov = parsedCamera.fov;