Jelajahi Sumber

oops with invert_from()

David Rose 24 tahun lalu
induk
melakukan
07a7224e2d
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      panda/src/linmath/lmatrix4_src.I

+ 4 - 1
panda/src/linmath/lmatrix4_src.I

@@ -1078,7 +1078,10 @@ INLINE_LINMATH bool FLOATNAME(LMatrix4)::
 invert_affine_from(const FLOATNAME(LMatrix4) &other) {
 invert_affine_from(const FLOATNAME(LMatrix4) &other) {
   FLOATNAME(LMatrix3) rot;
   FLOATNAME(LMatrix3) rot;
 
 
-  rot.invert_from(other.get_upper_3());  // probably could use transpose here
+  // probably could use transpose here
+  if (!rot.invert_from(other.get_upper_3())) {
+    return false;
+  }
 
 
   set_upper_3(rot);
   set_upper_3(rot);
 //  set_col(3, FLOATNAME(LVecBase4)(0.0f, 0.0f, 0.0f, 1.0f));
 //  set_col(3, FLOATNAME(LVecBase4)(0.0f, 0.0f, 0.0f, 1.0f));