Better mouse behavior.
This commit is contained in:
parent
1640101f65
commit
ff7d1db941
@ -114,11 +114,11 @@ export class InputHandler {
|
|||||||
|
|
||||||
// Handle camera panning
|
// Handle camera panning
|
||||||
if (this.isRightMouseDown) {
|
if (this.isRightMouseDown) {
|
||||||
const dx = (event.clientX - this.lastMouseX) * 0.1;
|
const dx = (this.lastMouseX - event.clientX) * 0.3;
|
||||||
const dy = (event.clientY - this.lastMouseY) * 0.1;
|
const dy = (this.lastMouseY - event.clientY) * 0.3;
|
||||||
|
|
||||||
this.app.renderer.moveCamera(-dx, dy);
|
this.app.renderer.moveCamera(dx, dy);
|
||||||
|
|
||||||
this.lastMouseX = event.clientX;
|
this.lastMouseX = event.clientX;
|
||||||
this.lastMouseY = event.clientY;
|
this.lastMouseY = event.clientY;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user