On Wed, Oct 8, 2008 at 2:47 PM, David Eyk <[EMAIL PROTECTED]> wrote: > > I'm confused by the proliferation of anchors on CocosNode. I've looked > at the comments, and anchor is commented doing the same thing as both > children_anchor and transform_anchor. Yet is anchor used at all? I > haven't seen it used except in the definition. > > It would make sense (to me) for anchor to be the place where > self.position snaps to, while transform_anchor is, well, the transform > anchor, but I don't know if this is actually a good idea. Is anchor > necessary, given the presence of the other two?
position is the position of the node. children_anchor is where, relative to that position, children will be added. transform_anchor is where the transform is applied. anchor sets both properties children_anchor and transform anchor. for example, on layers: children_anchor is 0,0 but transform anchor is x/2, y/2 on sprites you also have the image anchor that is what point of the image is placed at the position. is this clear? can you think of something better? Lucio. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
