Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoom to pointer #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

johnrees
Copy link

Hey! I enjoyed your video and thought I'd help out with something. Feel free to change this any of this code or close the PR and do your own thing with it.

I noticed that the game was always zooming to the center of the canvas, regardless of mouse position. This change zooms to the mouse position instead, more like google maps etc.

before

before.mov

after

after.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant