cbaizen Posted April 14, 2015 Share Posted April 14, 2015 Let's say I have a group torsos, and each torsos.children has a corresponding heads.children and legs.children. This means I have group heads and group legs. If so, can I do torsos.children.addChild(heads.children) ? I would like each i indexed element of torsos, heads, and legs to move together. Does it make sense to do this? I also need to be able to determine overlaps between group bullets and each group of body parts. The way I have it now, only group torsos seem to trigger overlap and my children heads and legs do not (bullets pass right through them). Can someone recommend a way to organize the data and be able to determine bullet overlaps to each piece of the body? I got it to work by not using addChilds and just make sure that each i indexed element has the same velocity. Kind of messy? Link to comment Share on other sites More sharing options...
Carlos Posted April 15, 2015 Share Posted April 15, 2015 From the overlap method docs: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups). You can put objects inside an array and test that array against the bullets. Link to comment Share on other sites More sharing options...
26medias Posted May 14, 2016 Share Posted May 14, 2016 On 4/15/2015 at 9:48 PM, Carlos said: From the overlap method docs: You can put objects inside an array and test that array against the bullets. How do you do that? I can't make it work? Link to comment Share on other sites More sharing options...
Recommended Posts