Running this on a MacBook Pro with secondary monitor. The project has a width of 640 and height of 960.
I’m having the editor on the built in monitor, doing a build and run. When I click on the four corners of the test window I get reasonable values for X and Y:
DEBUG:SCRIPT: X,Y = 13.25 13.192993164063
DEBUG:SCRIPT: X,Y = 11.75 944.56140136719
DEBUG:SCRIPT: X,Y = 625.75 941.19299316406
DEBUG:SCRIPT: X,Y = 621.25 13.75439453125
When I move the test window to the external monitor (placed above the build in) it seems that both X and Y is scaled down by two and that the Y has also around 480 added to it (half game height?)
DEBUG:SCRIPT: X,Y = 9.25 487.57894897461
DEBUG:SCRIPT: X,Y = 9.75 949.05261230469
DEBUG:SCRIPT: X,Y = 314.25 951.85961914063
DEBUG:SCRIPT: X,Y = 314.25 489.82455444336
When I’m running the editor on the external monitor the test window works ok when staying on the external, and when moving to the built in. But, if I then move it back to the external it has the same behavior as when it started on internal monitor.
From what it looks a built application on OsX has the same behavior.
My script code is just this, attached to a single go in the collection.
function init(self) msg.post(".","acquire_input_focus") end function on_input(self, action_id, action) if action.pressed then print("X,Y = " .. action.x .. " " .. action.y ) end end