Your math is off I think. Should be:
(ScreenWidth-windowWidth)/2
But You’re doing:
(ScreenWidth-windowWidth/2)
Develop games in your browser. Powerful, performant & highly capable.
Appologies, it was my own calculations. For the moveTo the subtraction of the outer window wasn't needed. removing that made it work. A bit weird that it worked in preview but thats probably just a coincidence.
for reference:
window.moveTo(((runtime.globalVars.screenWidth)/2), ((runtime.globalVars.screenHeight)/2));
Thanks all!