How to scale a CCLayer and keep its position?

247 views Asked by At

At the end of the game, I want to zoom out my CCLayer to show all the sprites. When I reduce the scale, the CCLayer become smaller and centered, what I want to know is how to scale the CCLayer and keep its y=0 (Origin at the bottom of the screen). Thanks in advance.

Best regards,

1

There are 1 answers

0
YvesLeBorg On BEST ANSWER

I believe that all CCNode children have an anchorPoint property. CCLayer defaults to (.5,.5) , midScreen. Try setting your layer's anchor point to (0.,0.).