Browse Source

Fix issue 935: error in matrix calculation

fsantini 10 years ago
parent
commit
cf325ba240
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/vector_3.cpp

+ 1
- 1
Marlin/vector_3.cpp View File

@@ -121,7 +121,7 @@ matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
121 121
 {
122 122
     vector_3 z_row = target.get_normal();
123 123
     vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal();
124
-    vector_3 y_row = vector_3(0, 1, -target.y/target.z).get_normal();
124
+    vector_3 y_row = vector_3::cross(z_row, x_row).get_normal();
125 125
 
126 126
    // x_row.debug("x_row");
127 127
    // y_row.debug("y_row");

Loading…
Cancel
Save