Commits

Roi Atalla committed 4a18902

Goddamn row-major/column-major order. The orientation was glitching because the Matrix4 returned by Quaternion.getMatrix was not transposed -_________-

  • Participants
  • Parent commits 831d356

Comments (0)

Files changed (2)

File src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example2/Example8_2.java

 	}
 	
 	private void offsetOrientation(Vector3 axis, float angle) {
-		System.out.println(axis.x() + " " + axis.y() + " " + axis.z());
-		
 		angle = angle * (float)Math.PI / 180;
 		
 		axis.normalize().mult((float)Math.sin(angle/2));

File src/main/java/com/ra4king/opengl/util/math/Quaternion.java

 				                0,                 0,                 0, 1,
 		};
 		
-		return new Matrix4(m);
+		return new Matrix4(m).transpose();
 	}
 }