Pages

Showing posts with label anchorpoint. Show all posts
Showing posts with label anchorpoint. Show all posts

Cocos2d-x: Coordinate System

Thursday, March 28, 2013

To understand the coordinate system of a game engine is a fundamental topic. In this tutorial I would like to describe the coordinate system of Cocos2d-x. The same concept is also applicable for Cocos2d game engine. You can also visit the Cocos2d-x Official Wiki Page which describes Cocos2d-x coordinate system briefly.

2D World Coordinate System


As cocos2d-x is a 2d game engine, we only use x-axis and y-axis to represent our coordinate system. Again, cocos2d-x uses OpenGL API to draw and manipulate objects. OpenGL use "right handed coordinate system" :