Skip to content

Commit

Permalink
fix truckSpeed for orthographic camera (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaricBaraou authored Feb 7, 2025
1 parent 99a2339 commit 6b1a7db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CameraControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3068,8 +3068,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 {

Expand Down

0 comments on commit 6b1a7db

Please sign in to comment.