You can simply divide the mouse coordinates by the scale factor.
Example: Scaling by factor 3 means that the mouse x-coordinate 150 is the x-coordinate 150/3=50 in your game coordinates.
However this will only work if you do not also use translate. In that case, you'd have to keep track of all transformations.
micha wrote:You can simply divide the mouse coordinates by the scale factor.
Example: Scaling by factor 3 means that the mouse x-coordinate 150 is the x-coordinate 150/3=50 in your game coordinates.
However this will only work if you do not also use translate. In that case, you'd have to keep track of all transformations.