stumped
stumped

Reputation: 3293

Where is the origin in a sprite?

Where are the origin (x,y) coordinates on a sprite? Is it at the top left? Is it different in cocos2d?

Upvotes: 1

Views: 724

Answers (1)

Mike Lorenz
Mike Lorenz

Reputation: 942

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.

Upvotes: 1

Related Questions