SkyAphid

Rotations

Nov 18th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1.             if (!markedMa){
  2.                 camMa.setFromEulerAngles((float) Math.toDegrees(-camera.getYaw()), (float) Math.toDegrees(camera.getPitch()), 0f);
  3.                 markedMa = true;
  4.             }
  5.            
  6.             float dx = (input.getMouseDX() * (prefs.mouseSensitivity * 5f));
  7.             float dy = (input.getMouseDY() * (prefs.mouseSensitivity * 5f));
  8.            
  9.             utilMatrix.setFromEulerAngles(0f, -dy, -dx);
  10.             camMa.mul(utilMatrix);
  11.            
  12.             plaMa.setFromEulerAngles((float) Math.toDegrees(trueYaw), (float) Math.toDegrees(pitch), (float) Math.toDegrees(roll));
  13.             plaMa.mul(camMa);
Advertisement
Add Comment
Please, Sign In to add comment