开发者

Where is the origin in a sprite?

Where are the origin (x,y) coordinates on a sprite? Is it at the top left开发者_JAVA百科? Is it different in cocos2d?


In cocos2d, the origin of a sprite is in the middle of the sprite, but you can change that with setAnchorPoint. Also remember the origin (0,0) of the screen is in the lower-left, the way OpenGL likes it, not the upper-left the way the Apple libraries like it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜