2

Currently, no matter how big the layer is, when I add a child sprite to it, the sprite will be shown on the screen. But if I want to restrict the visible area of the layer and only show children that is inside this area, how can I do it?

backspacer
  • 918
  • 1
  • 10
  • 19
  • 2
    Take a look at this topic [cocos2d-iphone-sprite-cliping-mask-frame](http://stackoverflow.com/questions/3177751/cocos2d-iphone-sprite-cliping-mask-frame) – imort Aug 02 '11 at 11:32

1 Answers1

1

You should give ClippingNode a go here: http://www.learn-cocos2d.com/2011/01/cocos2d-gem-clippingnode/

Saturn
  • 17,888
  • 49
  • 145
  • 271