MonoGame.Extended
MonoGame.Extended copied to clipboard
OrthographicCamera.ScreenToWorld and similar methods interact poorly with window not at (0,0)
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.