dune3d / dune3d

3D CAD application
https://dune3d.org
GNU General Public License v3.0
825 stars 24 forks source link

Zoom to mouse location instead of center of viewport #68

Closed mrlinuxfish closed 3 months ago

mrlinuxfish commented 3 months ago

Zooming on most cad programs I've used occurs at the mouse cursor, and I find this very helpful for navigating around a model.

Actual behaviour

Scrolling to zoom causes the viewport to zoom centered on the center of the viewport

Expected behaviour

Scrolling to zoom causes the viewport to zoom centered on the mouse cursor

carrotIndustries commented 3 months ago

Idk, I've never found this to be a problem and was too lazy to work out the maths to make that happen. While this should work for orthographic projection, I don't see how this could work satisfactory for perspective projection.