hi, I see that the center of the game is at 0,0 so how do you change it? like 0,0 is the top left of the game. Thanks!
The forum is read-only. New threads, replies and edits are disabled.
Change the center of the whole game
if you want the top-left corner of the screen to be (0, 0) in your game worlds coordinates, i think you can just move the camera by half the screen size
wade.setCameraPosition({x: wade.getScreenWidth()/2, y: wade.getScreenHeight()/2, z: 1});it works if you dont move the camera on z (to zoom in/out). If you do i think theres more maths involved.
Thanks hermes! that's very helpful.
I forgot to add one thing: you should change the camera position every time the screen is resized to keep the top-left at (0, 0). In your App function, just add this:
this.onResize = function(){ wade.setCameraPosition({x: wade.getScreenWidth()/2, y: wade.getScreenHeight()/2, z: 1});};
