How to convert the 2D coordinates of mouse to 3D coordinates of real objects in the world space? As you know the mouse has two coordinates of x and y on the screen, but we want to select a 3-dimensional point, member, or object in the world space.
In this post, I will show you, we can do it by a series of transformations a 3-dimensional coordinate of a world space object can be converted to the 2-dimensional coordinate of mouse or screen space.
I will show you how we can convert a 3-dimensional point to a 2-dimensional point on the screen using a numerical example and apply it to the code of a graphical program. Also, I will discuss world space, eye space, Homogenous and clip space, as well as Viewport or screen space, along with view matrix, projection matrix and perspective matrix.
Comments