# Cartesian coordinate system

Hi,

Phaser has the origin (0,0) on the upper left, where positive x coordinates go to the right, and positive y coordinates go down.

However, the origin (0,0) in mathematics in Cartesian coordinate system is the “center” of the screen, while and positive y goes up, negative down, positive x goes right and negative left.

Is there a way to tell Phaser to use Cartesian coordinate system?

Thanks
STeN

You can think of the canvas itself as Cartesian Quadrant Ⅰ with the y-axis inverted.

You can’t change that, but you can transform the camera view:

``````this.cameras.main
.centerOn(0, 0)
.setZoom(1, -1)
``````

That would also invert all your game objects, so you would probably add

``````sprite.flipY = true;
``````

Hi @samme
Thanks for the tip!!

I have decided to use internally all four quadrants and translate all x,y coordinates before drawing to the centre of the quadrant I (i.e. screen). In the end is just two lines of the code per each vector/game object. e.g.:

``````projectedVector.x += this.sceneSize.width / 2
projectedVector.y += this.sceneSize.height / 2
``````

Have a nice day
STeN