I've seen something like this before. I didn't mention it at the time as it was at the height of everyone moaning about the progress of AppGameKit V2 and I figured it would all only get sorted out when Paul started work on the 3D commands.
I can't quite remember the combination of things I did to stop if from happening. It wasn't a solution, just a compromise on the design.
I'll have a look into it and see if I can recreate it.
[edit]
This is what I've seen before:
The image on the left is what I want, in this case it's a section of race track going through a ring.
The image in the middle is achieved simply by turning on both objects transparencies using the "SetObjectTransparency" command.
LoadObject(1,"track_straight.obj")
SetObjectColor(1,255,255,255,255)
SetObjectTransparency(1,1)
LoadObject(2,"scenery_ring.obj")
SetObjectColor(2,255,0,0,255)
SetObjectTransparency(2,1)
CreateLightDirectional(1,0,-0.5,1,255,255,255)
SetCameraPosition(1,100,100,-200)
SetCameraLookAt(1,0,0,0,0)
do
sync()
loop
The image on the right was when I simply loaded the objects in a different order:
LoadObject(2,"scenery_ring.obj")
SetObjectColor(2,255,0,0,255)
SetObjectTransparency(2,1)
LoadObject(1,"track_straight.obj")
SetObjectColor(1,255,255,255,255)
SetObjectTransparency(1,1)
CreateLightDirectional(1,0,-0.5,1,255,255,255)
SetCameraPosition(1,100,100,-200)
SetCameraLookAt(1,0,0,0,0)
do
sync()
loop
Note, the actual alpha of both objects is 255 which is why they don't appear transparent but this doesn't actually effect what's going on. The last object to be created is drawn on top of the previous one. It also doesn't matter if you set the transparency modes to 2.
In my game (Hover Car Race Challenge Accepted) I wanted the scenery objects, such as the ring, to fade in, as the camera got closer. I also wanted the track to fade in but couldn't do this because of this graphical issue. So track sections "pop in" which isn't ideal but I lived with it.