Skip to main content
deleted 24 characters in body; edited title
Source Link

How to get mousepolygon coordinates in worldscreen space

I need to be able to click on this polygon in 2d that has its. This polygons set of vertices aren't in another space. I need to convert my mouse coordinates to itsthe same space. I have a view matrix for as the viewscreen. (of course) and transform matrix forIe: the polygon. I imagine I need to multiplyedge of the matricesscreen may be a value of 20 in some way then multiply them with the mouse coordinateone space but I don't know how? Do1920 in the other) the scale is different. How can I needconvert the inverse of onevertices of the matrices?polygon to the screen space so that I can use the mouse coordinates to click on it. (This is only 2d)

How to get mouse coordinates in world space

I need to be able to click on this polygon in 2d that has its vertices in another space. I need to convert my mouse coordinates to its space. I have a view matrix for the view (of course) and transform matrix for the polygon. I imagine I need to multiply the matrices in some way then multiply them with the mouse coordinate but I don't know how? Do I need the inverse of one of the matrices?

How to get polygon coordinates in screen space

I need to be able to click on this polygon in 2d. This polygons set of vertices aren't in the same space as the screen. (Ie: the edge of the screen may be a value of 20 in one space but 1920 in the other) the scale is different. How can I convert the vertices of the polygon to the screen space so that I can use the mouse coordinates to click on it. (This is only 2d)

Source Link

How to get mouse coordinates in world space

I need to be able to click on this polygon in 2d that has its vertices in another space. I need to convert my mouse coordinates to its space. I have a view matrix for the view (of course) and transform matrix for the polygon. I imagine I need to multiply the matrices in some way then multiply them with the mouse coordinate but I don't know how? Do I need the inverse of one of the matrices?