Browse Source

Small fix for normal calculation

In certain cases, when provided an initial normal, the normal will be
calculated incorrectly. This fixes the issue. @jbousquie
Raanan Weber 9 năm trước cách đây
mục cha
commit
7350ec50e1
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/Math/babylon.math.ts

+ 2 - 2
src/Math/babylon.math.ts

@@ -3566,8 +3566,8 @@
             }
             else {
                 normal0 = Vector3.Cross(vt, va);
-                Vector3.CrossToRef(normal0, vt, normal0);
-                //normal0 = Vector3.Cross(normal0, vt);
+                //Vector3.CrossToRef(normal0, vt, normal0);
+                normal0 = Vector3.Cross(normal0, vt);
             }
             normal0.normalize();
             return normal0;