瀏覽代碼

heads_up was broken

David Rose 20 年之前
父節點
當前提交
9e1297d56b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      panda/src/mathutil/look_at_src.cxx

+ 1 - 1
panda/src/mathutil/look_at_src.cxx

@@ -84,7 +84,7 @@ heads_up(FLOATNAME(LMatrix3) &mat, const FLOATNAME(LVector3) &fwd,
     // axis is the amount to rotate about the X axis to bring the up
     // vector to the Z axis.
 
-    FLOATNAME(LVector2) x(up[1], up[0]*y[0]+up[2]*y[1]);
+    FLOATNAME(LVector2) x(-up[1], up[0]*y[0]+up[2]*y[1]);
     d = dot(x, x);
     if (d==0.0f) {
       x = FLOATNAME(LVector2)(0.0f, 1.0f);