How to map mouse coordinates to 2D global coordinates
- hrkhoshnoud
- Mar 25, 2024
- 1 min read
This video is a continuation of the previous post on "How to convert the 2D coordinates of the mouse to 3D coordinates of real objects in the world space". Here, we focus on converting two-dimensional coordinates of the mouse, considering zooming and panning, into two-dimensional coordinates in world space. While the mouse provides coordinates in pixels on the screen, we aim to select a 2-dimensional point or object in the world space, defined in meters or feet. I'll demonstrate how a series of transformations can achieve this, allowing a 2-dimensional coordinate of a world space object to be converted into the 2-dimensional coordinate of the mouse or screen space, with zooming and panning actions.
Commenti