Different degrees with different screen sizes (SOLVED)

Hello Guys

I have a problem with different degrees whe I resize the Window.
When I don’t resize the Window the degree seems to be fine.
When I resize the Window the degree shows wrong values.

I am not an experienced programmer.
I use Rendercam to get the best fit for different screen resolutions and to keep the aspect ratio.

the Player Object coordinate are fine in every resolution but I think the Mouse Action x , y coords are wrong.

how can I get the correct mouse coordinates?
or what I’m doing wrong?

Translate the input action position to world position and it should work.

local mouse_cord = rendercam.screen_to_world_2d(action.x, action.y)

It might require, can’t remember for sure right now.

local mouse_cord = rendercam.screen_to_world_2d(action.screen_x, action.screen_y)
1 Like

Thank you very much. :smiley:
The second line was the correct one.

local mouse_cord = rendercam.screen_to_world_2d(action.screen_x, action.screen_y)
1 Like