Scroll REALLY Fixed
This commit is contained in:
parent
41fc399f70
commit
161f9b64c2
@ -75,15 +75,11 @@ public class JoglMouseListener implements MouseListener, MouseMotionListener, Mo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseWheelMoved(MouseWheelEvent e) {
|
public void mouseWheelMoved(MouseWheelEvent e) {
|
||||||
if( 45 > Math.abs(canvas.camera[3]))
|
if( 45 > Math.abs(canvas.camera[3]) && 45>Math.abs(canvas.camera[4]))
|
||||||
canvas.camera[0] += e.getWheelRotation() * Math.tan(Math.toRadians(-canvas.camera[3])) * 0.25;
|
canvas.camera[0] += e.getWheelRotation() * Math.tan(Math.toRadians(-canvas.camera[3])) * 0.25;
|
||||||
else
|
else
|
||||||
canvas.camera[0] += e.getWheelRotation() * Math.tan(Math.toRadians(canvas.camera[3])) * 0.25;
|
canvas.camera[0] += e.getWheelRotation() * Math.tan(Math.toRadians(canvas.camera[3])) * 0.25;
|
||||||
if(45>Math.abs(canvas.camera[4]))
|
|
||||||
canvas.camera[1] += e.getWheelRotation() * Math.tan(Math.toRadians(canvas.camera[4])) * 0.25;
|
canvas.camera[1] += e.getWheelRotation() * Math.tan(Math.toRadians(canvas.camera[4])) * 0.25;
|
||||||
else
|
|
||||||
canvas.camera[1] += e.getWheelRotation()*Math.tan(Math.toRadians(-canvas.camera[4]))*0.25;
|
|
||||||
|
|
||||||
if( 45 < Math.abs(canvas.camera[3]) || 45 < Math.abs(canvas.camera[4]))
|
if( 45 < Math.abs(canvas.camera[3]) || 45 < Math.abs(canvas.camera[4]))
|
||||||
canvas.camera[2] += -e.getWheelRotation()*0.25;
|
canvas.camera[2] += -e.getWheelRotation()*0.25;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user