FreshRSS

Normální zobrazení

Jsou dostupné nové články, klikněte pro obnovení stránky.
PředevčíremHlavní kanál
  • ✇Recent Questions - Game Development Stack Exchange
  • zoom to cursor calculationuser5872
    I want to be able to zoom in and out of the map using the scroll wheel. I want to zoom towards the cursor like Google Maps does, but I'm completely lost on how to calculate the movements. So far, all I have is the resizing, but I now need to change the map position. What I have: map x and y; map width and height; cursor x and y. Any help would be most welcome.
     

zoom to cursor calculation

I want to be able to zoom in and out of the map using the scroll wheel. I want to zoom towards the cursor like Google Maps does, but I'm completely lost on how to calculate the movements.

So far, all I have is the resizing, but I now need to change the map position.

What I have: map x and y; map width and height; cursor x and y.

Any help would be most welcome.

❌
❌