Hi Gary,
It sounds like you have set it up right, but the problem is with the After Effects layer hierarchy. The flags of 3D Flag are in 3D space, and the camera moves around in 3D space, but the After Effects layers are still in a 2D stack. Let’s assume, to start with, that you have only two layers with 3D Flag applied to them and you have a camera rotating around them. If you start with one flag behind another and it looks correct, as the camera rotates around, there will be a point where the flag that was in the back becomes positioned in the front, but it’s still on the bottom layer so it’s still behind the other flag even though it’s closer to the camera.
What you have to do is find a point in the timeline where the back flag is about to rotate around to become the front flag, but isn’t quite in the front of your configuration yet. At that point in the timeline, split the layer (Edit –> Split Layer). You’ll now have a duplicate layer, and both layers will be cropped right at your timeline marker, one before the marker and the other after the marker. Take the top layer that you just split, and drag it above the other flag layer. Now as the back flag comes around, it will be on top, and it should look correct.
With four flag layers, it gets a little trickier, but it’s still the same concept.
Hopefully this made sense and helps solve your problem.
Thanks,
Brent