MaibornWolff / codecharta

CodeCharta visualizes multiple code metrics using 3D tree maps.
https://maibornwolff.github.io/codecharta/
BSD 3-Clause "New" or "Revised" License
186 stars 29 forks source link

Camera zoom causes unintended rotation when map is tilted #3730

Open IdrisLaabidi opened 1 week ago

IdrisLaabidi commented 1 week ago

Bug

Expected Behaviour

GIVEN the map is tilted and buildings are visible

WHEN zooming in

THEN the camera should dolly towards the mouse pointer position.

Actual Behavior

The camera appears to be rotating, following an arc trajectory towards the mouse coordinates instead of dollying straightforward.

Screenshots

Steps to Reproduce the Problem

  1. Tilt the map as much as possible while still being able to see the buildings.
  2. Attempt to zoom in.

Specifications

ChristianHuehn commented 4 days ago

We will try to just remove the rotation 👍

Nereboss commented 18 hours ago

I tried to address this issue but was not lucky so far. It seems to be a bug within ThreeJS when using the zoomToCursor functionality that can also be observed on their demos e.g. here. There is also an open issue about it in their repo here

While there is an option to disable camera rotation and it did disable the user being able to rotate the camera, the rotation of this arc was unaffected.

As this issue does not happen often and theres no easy fix we can do, id suggest closing this and to hope threeJS fixes it in an upcoming version