Replies: 1 comment 4 replies
-
Demo: https://codepen.io/ckochis/pen/bGvBdEG Just as a follow up, was able to get the zoom working, following the guidance from here. zoom_working.movHowever, I'm running into an issue when a translation is also applied. It seems like it's still scaling based on the origin (ie. just the mouse position), not taking into account the translated world. zoom_not_working.mov |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
First off, just wanted to say thanks for all the work put into this site, it has truly helped a ton with my understanding of 3D programming, in a way that’s finally starting to stick 😅
I’m experimenting with building a “map-like” experience, basically the ability to pan and zoom on geometries that are made up of latitude and longitude coordinates. I have a CodePen here: https://codepen.io/ckochis/pen/bGvBdEG
I have the “pan” part down, but the zoom isn’t quite working as expected (focus point doesn’t seem to correlate to the mouse position). Have been following this guide for the most: part https://webglfundamentals.org/webgl/lessons/webgl-qna-how-to-implement-zoom-from-mouse-in-2d-webgl.html
Most likely the math is probably off, but was wondering if something more obvious was the culprit. Open to any other general guidance on my application as well.
Any help here is greatly appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions