Zemanzo / web-marbles

Aims to recreate Marble Racing from the ground up, as a fully web based game
https://playmarbl.es/
GNU General Public License v3.0
23 stars 12 forks source link

Scrolling to zoom the camera in tracking mode does not work in some cases. #300

Closed Zemanzo closed 3 years ago

Zemanzo commented 3 years ago

Expected behavior When using the mousewheel in the viewport whilst the camera is in tracking mode, it should zoom in (or out) on the currently tracked marble.

Actual behavior When using the mousewheel in the viewport whilst the camera is in tracking mode, it does not zoom. This is because the DeltaY value is way too big since it does not take the DeltaMode into account. Read more here: https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaY

Reproduction steps

  1. Just scroll the damn thing I basically explained it above already.

Platform OS: Windows 10 Browser version: Firefox Developer Edition (93.0b5 (64-bit)) Build version: 1.3.1 (latest /dev branch)

Zemanzo commented 3 years ago

Might be a duplicate of #267