coordinate system
rickierich

Could you explain the system please?

I am assuming the centre is 0,0, Is the centre of the object or the corner placed in the centre?

All 2 Comments
Gio

You are right (0, 0) is the center of the world. If you don't move the camera, it's also the center of the screen.

When you do

myObject.setPosition(x, y);

you are placing the center of the object at (x, y) coordinates in the world.

rickierich

aspectratio = window.devicePixelRatio || 1

could I also suggest you take the above line into consideration as it affects everything. screen size as well.

Post a reply
Add Attachment
Submit Reply
Login to Reply