Using display list hieararchies and collision system

I have a sprite which has two child sprites attached to it.
I've added all 3 to the box2d collision system.

As far as collisions go, the parent level sprite is detected and collided against.
The other two are ignored. I believe this is because when I added the 2 children
sprites, they had local coordinates (in relation to their parents).
To fix this, I calculated the world coordinates of the 2 child sprites (local + parent x/y)
and passed the info to the box2d coll system that way.

After this, the collisions started working, but my objects were no longer being displayed
properly. I think adding the children sprites as user data to the coll system affects their
sprite x/y. (for this case i'm only dealing with static objects)

Is there someway to pass in local coordinates for children sprites and set some flag that
tells the box2d system to aggregate their x/y positions to get a world one for collision detections?
Or am I approaching this in the wrong way?

Thanks,
Joe
Setting up hierarchies like this is not usually a good idea, as it gets incredibly messy once you start including rotation or scaling.

But if you have a good reason, and are not dealing with rotation, then I recommend the best way to deal with this is not having a flag to mark stuff as children, but to simply set the x/y position of each sprite using globalToLocal, which will ensure it doesn't matter what the local co-ordinate system is.

Original thread: https://box2d.org/forum/viewtopic.php?t=465