Need a bounding box for CCSprite that includes all children/subchildren
Posted
by
prototypical
on Game Development
See other posts from Game Development
or by prototypical
Published on 2012-12-31T22:04:23Z
Indexed on
2013/11/05
16:14 UTC
Read the original article
Hit count: 304
I have a CCSprite that has CCSprite children, and those CCSprite children have CCSprite children.
The contentSize property doesn't seem to include all children/subchildren, and seems to only work for the base node. I could write a recursive method to traverse a CCSprite for all children/subchildren and calculate a proper boundingbox, but am curious as to if I am missing something and it's possible to get that information without doing so.
I'l be a little surprised if such a method doesn't exist, but I can't seem to find it.
© Game Development or respective owner