开发者

Where is the origin in a sprite?

开发者 https://www.devze.com 2023-03-25 09:48 出处:网络
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 chan

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

精彩评论

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