Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- qreal radialHeight = current_cam->distance_z/2 * tan(current_cam->FOV/2 * (PI / 180));
- qreal aspectRatio = 854.0 / 480.0;
- qreal radialWidth = radialHeight * aspectRatio;
- //LET'S TURN MOUSE COORDINATES (SCREEN COORDS) INTO EYE SPACE COORDS
- qreal conv_x = ( (mousex / (854.0/2.0)) -1) * radialWidth;
- qreal conv_y = ( (mousey / (480.0/2.0)) -1) * radialHeight;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement