Action.xy and Action.screen_xy are the same

I moved the camera around and made sure to go past the origin point of the world and the results of ACTION.XY and ACTION.SCREEN_XY were still the same, besides some slight variation in Y values which puzzled me. From the documentation, it sounds like action.x and y will lead to the point in world position, and action.screen_x and y will obviously lead to the point in screen position.

Are these values correct?:

action.x/y and action.screen_x/y will differ if the actual screen resolution differs from what’s in game.project. It has nothing to do with if a camera is offset from 0,0.

If you need screen coordinates while also using a camera you need to investigate how to translate world to screen coordinates and vice versa. I believe that @ross.grams RenderCam can do it and my Orthographic Camera can also do it via camera.screen_to_world().

4 Likes