I’m a little confused about CCSprite’s position: is this it’s center or bottom left? CCNode, CCLayer, CCMenu, CCMenuItem are the same?
I’m a little confused about CCSprite’s position : is this it’s center or bottom
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s the center by default, except for CCNode, CCLayer and CCScene where it is the lower left corner.
Since the CCNode has 0 width and 0 height the lower left corner equals its center unless you set the contentSize property manually.
The anchorpoint can modify where the texture is drawn over a node’s position. Typically you don’t want to change it though. See here: https://stackoverflow.com/a/7810180/201863