Advertisement
faenil

Untitled

Oct 17th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. qreal radialHeight = current_cam->distance_z/2 * tan(current_cam->FOV/2 * (PI / 180));
  2. qreal aspectRatio = 854.0 / 480.0;
  3. qreal radialWidth = radialHeight * aspectRatio;
  4. //LET'S TURN MOUSE COORDINATES (SCREEN COORDS) INTO EYE SPACE COORDS
  5. qreal conv_x = ( (mousex / (854.0/2.0)) -1) * radialWidth;
  6. qreal conv_y = ( (mousey / (480.0/2.0)) -1) * radialHeight;
  7.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement