Pan with middle mouse #41

This commit is contained in:
Viktor Kovacs 2021-03-31 16:20:50 +02:00
parent 4acbf3046c
commit e48c1b51e1

View File

@ -390,7 +390,7 @@ OV.Navigation = class
if (mouseButton === 1) {
let orbitRatio = 0.5;
this.Orbit (moveDiff.x * orbitRatio, moveDiff.y * orbitRatio);
} else if (mouseButton === 3) {
} else if (mouseButton === 2 || mouseButton === 3) {
let eyeCenterDistance = OV.CoordDistance3D (this.camera.eye, this.camera.center);
let panRatio = 0.001 * eyeCenterDistance;
this.Pan (moveDiff.x * panRatio, moveDiff.y * panRatio);