I have a hierarchy like this:
Scene
- gameWorld (CCLayer Z:0)
- player (CCSprite Z:1)
- spriteWorld (CCNode Z:0)
- bgSprite (CCSprite Z:0)
- enemy (CCSprite Z:0)
The spriteWorld gets rotated and the bgSprite gets moved around so any CCSprites placed on bgSprite has a rotated and moved coordinate system compared to the gameWorld coordinate system.
I need to detected collisions between CCSprites placed both on the gameWorld and bgSprite. Now I have seen this post here:
Cocos2D CCNode position in absolute screen coordinates
which can give me each sprites position relative to the screen, but how do I then calculate or get the bounding box for these sprites? Those bounding boxes are rotate both via the spriteWorld rotation but each sprite also rotates on the bgSprite.
Sounds like a lot of crazy math to me and I am a fool at math, so I really really need help here.
Thank you Særen