graphicszoomingdirectx-9scrollwheel

Math for zoom to cursor on mouse wheel scrolling


Have to implement a Directx9 project that involves zoom towards the cursor like Google maps with the mouse scroll wheel (similar to this implementation by Phrogz).

Need the math and the variables required for the same.


Solution

  • Solved this problem using below steps

    We have mathematical equation to guide the coordinates of the camera per scroll which when placed in the code provides the required zoom to cursor effect.