Commits

Roi Atalla  committed f8fabef

GODDAMNIT THESE TINY TYPOS ARE KILLING ME >:(

  • Participants
  • Parent commits 7a30149

Comments (0)

Files changed (1)

File src/main/java/com/ra4king/opengl/util/MousePoles.java

 		
 		public Matrix4 calcMatrix() {
 			Matrix4 translateMat = new Matrix4().clearToIdentity();
-			translateMat.translate(po.position);
+			translateMat.put(3, po.position);
 			return translateMat.mult(po.orientation.toMatrix());
 		}
 		
 		}
 		
 		private Quaternion calcRotationQuat(int axis, float angle) {
-			return Utils.angleAxisDeg(axis, axisVectors[axis]);
+			return Utils.angleAxisDeg(angle, axisVectors[axis]);
 		}
 		
 		private void rotateWorldDegrees(Quaternion rot, boolean fromInitial) {
 		public void mouseMove(int positionX, int positionY) {
 			if(isDragging) {
 				int diffX = positionX - prevMousePosX;
-				int diffY = positionY - prevMousePosY;
+				int diffY = -(positionY - prevMousePosY);
 				
 				switch(rotateMode) {
 					case DUAL_AXIS:
 						{
 							Quaternion rot = calcRotationQuat(Axis.AXIS_Y, diffX * rotateScale);
-							rot = calcRotationQuat(Axis.AXIS_X, -diffY * rotateScale).mult(rot).normalize();
+							rot = calcRotationQuat(Axis.AXIS_X, diffY * rotateScale).mult(rot).normalize();
 							rotateViewDegrees(rot, false);
 						}
 						break;
 		
 		public void onDragRotate(int currX, int currY) {
 			int diffX = currX - startDragMouseLocX;
-			int diffY = - (currY - startDragMouseLocY);
+			int diffY = -(currY - startDragMouseLocY);
 			
 			switch (rotateMode) {
 				case DUAL_AXIS_ROTATE: