O'Reilly logo

Developing Mobile Games with Moai SDK by Francisco Tufro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coordinate systems

Sooner or later, if you're developing multi-platform games, you'll need to understand the different coordinate systems that are involved.

In Moai SDK, we have at least three coordinate systems that are important to remember and to make good use of.

Window/Screen coordinates

This is the coordinate system attached to your window. You will typically have to deal with it when receiving mouse or touchscreen input. You might also use it to design your GUI. If you ever experience any strange behavior when clicking, always double-check that you're correctly transforming input coordinates to world or even model coordinates.

World coordinates

This is the coordinate system that you define when setting the scale for the viewport, and is the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required