Hello, I have followed the official tutorial about screen to world, and my setup is the same as in the video. The camera is a top-down style that follows player as shown in screenshot:
The machine is:
Problem is there is always an offset between the cursor in 3d space (blue circle) and the real position of the mouse cursor in screen. I want both to be exacly same so for example when I click, character moves to that position (this is not exactly what I want, but to say).
Screen to world space action has a ScreenZ value of 10, I tried to do raycast from near clip plane of camera to blue circle and get distance (ok), then feed this distance to Screen Z, but I think there's little more math to do so both pointers (real mouse and blue circle) are exactly in the same position.
This offset is bigger the more far you get from camera...this is why I think it is related withj Screen Z but I don't know exactly what maths must be done UU'