Rotating the main sprite will rotate the pinned collision boxes too. Almost sounds like you're doing an "impossible square" game though?impossible square on codecanyon
I'm not even sure you need collision boxes for this if that's the case. You'd just base it on angles.
Like, red is 0degrees.. yellow is 90.. green 180.. blue is 270
Then on collision, check the angle of the main sprite, then you'll know which colour it is.