I am trying to make a function with blueprint that normalize mouse coordinates in a way that center of my viewport is 0, 0.
Formula is following MouseX - DisplayX/2, MouseY - DisplaY/2
The problem is Get mouse position on Viewport returns different value at the edge of my view port then Get Viewport size. Delta is not huge, about 150-200 pixel. But this makes the center go off. For example with viewport length of 1900 the most right X pos would be around 1750.
update:
To make things work I had to divide GetViewPortSize by GetViewPortScale. Could some one explain why is it necessary? Is there a way to get correct ViewPortSize right away without this operation?