# What is the difference between action.xy and action.screen\_xy? (SOLVED)

**URL:** <https://forum.defold.com/t/what-is-the-difference-between-action-xy-and-action-screen-xy-solved/68711>\
**Category:** Questions\
**Created:** [June 25, 2021, 6:29am UTC](https://forum.defold.com/t/what-is-the-difference-between-action-xy-and-action-screen-xy-solved/68711 "2021-06-25T06:29:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_8BitSkull](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/alex_8bitskull/32/5424_2.png) [@Alex\_8BitSkull](https://forum.defold.com/u/Alex_8BitSkull)\
**Post date:** [June 25, 2021, 6:29am UTC](https://forum.defold.com/t/what-is-the-difference-between-action-xy-and-action-screen-xy-solved/68711/1 "2021-06-25T06:29:45Z")

</div>

Yeah, I’m answering this question myself. Because I will inevitably forget and then search the forums again. Hi, future me!

Assume you have set your dimensions as 960x540 in game.project. You’re playing on a 1920x1080 monitor. If you place your cursor in the top right, the position of your input would be:

action.x,y → 960 x 540  
action.screen\_x,y → 1920 x 1080

So, to help me think about it, you might call action.xy something like “action.game\_project\_xy” instead, since the input is translated to fit your game project dimensions.

**BONUS:**  
In [Orthographic](https://github.com/britzl/defold-orthographic), “screen” co-ordinates refers to action.xy, and “window” co-ordinates refers to action.screen\_xy. This is explained [in the docs](https://github.com/britzl/defold-orthographic#window-vs-screen-coordinates).

If anyone else has any other tips to add, feel free. I’m always struggling to conceptualise input on different resolutions and stretched game windows, etc, so anything will be helpful.

---

<div class="post-metadata">

**Author:** ![Pinchazumos](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pinchazumos/32/20811_2.png) [@Pinchazumos](https://forum.defold.com/u/Pinchazumos)\
**Post date:** [June 25, 2021, 9:01am UTC](https://forum.defold.com/t/what-is-the-difference-between-action-xy-and-action-screen-xy-solved/68711/2 "2021-06-25T09:01:23Z")

</div>

Man doing this kind of “help for future me” is such a good idea hahaha, its just like taking notes but they’re available for everyone else too. I’ve struggled with this same thing in the past, and I’m not entirely sure that it won’t happen again XD so thanks from future me too haha.

---

<div class="post-metadata">

**Author:** ![Mathias](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias/32/44015_2.png) [@Mathias](https://forum.defold.com/u/Mathias)\
**Post date:** [January 30, 2026, 2:09pm UTC](https://forum.defold.com/t/what-is-the-difference-between-action-xy-and-action-screen-xy-solved/68711/3 "2026-01-30T14:09:39Z")

</div>

So much thank you!  
I am here to say that this information is missing in the manual ([Mouse and touch input in Defold](https://defold.com/manuals/input-mouse-and-touch/#mouse-movement) ) and should be added, your post saved me I was searching this in the manual or the API!  
There is examples using x ou screen\_x sometime, but the manual doesn’t explain whats the difference!

---

<div class="post-metadata">

**Author:** ![boruok](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/boruok/32/21851_2.png) [@boruok](https://forum.defold.com/u/boruok)\
**Post date:** [January 30, 2026, 4:05pm UTC](https://forum.defold.com/t/what-is-the-difference-between-action-xy-and-action-screen-xy-solved/68711/4 "2026-01-30T16:05:28Z")

</div>

[https://forum.defold.com/t/requested-display-width-and-height-is-not-always-obeyed/81126/9](https://forum.defold.com/t/requested-display-width-and-height-is-not-always-obeyed/81126/9)

---

<div class="post-metadata">

**Author:** ![Mathias](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias/32/44015_2.png) [@Mathias](https://forum.defold.com/u/Mathias)\
**Post date:** [January 30, 2026, 8:17pm UTC](https://forum.defold.com/t/what-is-the-difference-between-action-xy-and-action-screen-xy-solved/68711/5 "2026-01-30T20:17:41Z")

</div>

Nice thank you very much, it is now crystal clear!

This last post should definitly be in the manual!!  
Because I am kind of RTFM people so…I RTFM not … forums for documentation!  
And with version 1.12 we can complete the last part with the new camera.screen\_to\_world() API.

I guess this could end all questioning about it!
