Output of project world to screen/ project world location to widget slightly incorrect

Trying to do mouse tracking of the mesh itself. But unfortunately I can’t get the right position of the actor in the screen, which makes finding the angle wrong. I tried to find the coordinate value through project wtld to screen, then transfer to viewport so it can work properly with the mouse at different resolutions. X coordinate is transfered correctly, Y coordinate not only looks unrealistic (regarding resolution) but also inverted. I tried to get Y coordinate through project world location to widget position, but the more square the resolution is, the less correctly the y coordinate is found, because of its displacement by 40-50 units. All checkboxes are tried, there were experiments with scale viewport, but the desired result did not come. Perhaps I am missing something in project world to screen, perhaps it can be converted for my needs, I hope for your help, thank you in advance!

PS. There is one more problem, but less important, the angle between the mouse and the object I find by classics, through the arctangent and finding the angle as in a right triangle. however, the actor is not rotated much where expected, most likely there is some problem because the display of the camera orthographic, and perhaps requires a correction to the angle, but has not yet thought of what kind.

Thanks in advance for your help!

1 Like