From 352d429f1755a9e12d7655b9c1b9cb34ad06268f Mon Sep 17 00:00:00 2001 From: Alaric Baraou Date: Tue, 17 Dec 2024 00:05:13 +0900 Subject: [PATCH] fix truckSpeed for orthographic camera --- src/CameraControls.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CameraControls.ts b/src/CameraControls.ts index 05f7498..65bf478 100644 --- a/src/CameraControls.ts +++ b/src/CameraControls.ts @@ -3036,8 +3036,8 @@ export class CameraControls extends EventDispatcher { const camera = this._camera; - truckX = deltaX * ( camera.right - camera.left ) / camera.zoom / this._elementRect.width; - pedestalY = deltaY * ( camera.top - camera.bottom ) / camera.zoom / this._elementRect.height; + truckX = this.truckSpeed * deltaX * ( camera.right - camera.left ) / camera.zoom / this._elementRect.width; + pedestalY = this.truckSpeed * deltaY * ( camera.top - camera.bottom ) / camera.zoom / this._elementRect.height; } else {