MonoGame.Extended icon indicating copy to clipboard operation
MonoGame.Extended copied to clipboard

OrthographicCamera.ScreenToWorld and similar methods interact poorly with window not at (0,0)

Open Charlie-83 opened this issue 1 year ago • 0 comments

ScreenToWorld and WorldToScreen adjust the screen position by the origin of the viewport. However, when the origin of the window is not (0,0) this also adjusts by whatever the offset of the window is. This is very unlikely to be what you want since things like MouseState position or TouchState position are already relative to the window and so you are required to pre-emptively undo the correction made by ScreenToWorld (or WorldToScreen) using window information.

Charlie-83 avatar Oct 25 '22 23:10 Charlie-83