I'm chasing a transparency/ghosting bug, and although I thought that this could be a good example, I actually fixed your problem.
Add this to the object setup:
dbDisableObjectZWrite(i+1);
And use dbPointObject instead of dbSetObjectToCameraOrientation:
dbPointObject ( i+1, dbCameraPositionX(), dbCameraPositionY(), dbCameraPositionZ() );
It seems to me that the rotation of the objects didn't work fine for some angles when using dbSetObjectToCameraOrientation.
Here is the full source:
#include "DarkGDK.h"
void DarkGDK ( void )
{
int i;
float ay=0;
dbSyncOn();
dbSyncRate(60);
dbColorBackdrop(0);
dbSetCameraRange (1.0f, 1000.0f);
dbLoadImage("flare verde.png",1);
for(i=0;i<15;i++)
{
dbMakeObjectPlain(i+1,40,40);
//dbPositionObject(i+1,5*i,0,0);
dbPositionObject(i+1,5+5*i,0,0);
dbTextureObject(i+1,1);
dbGhostObjectOn(i+1,2);
dbSetObjectLight(i+1,0);
dbDisableObjectZWrite(i+1);
}
while ( LoopGDK ( ) )
{
ay=dbWrapValue(ay+0.1);
dbPositionCamera(0,0,0);
dbYRotateCamera(ay);
dbMoveCamera(-150);
for(i=0;i<15;i++)
//dbSetObjectToCameraOrientation(i+1);
dbPointObject ( i+1, dbCameraPositionX(), dbCameraPositionY(), dbCameraPositionZ() );
dbSync();
}
return;
}
I will have to look somewhere else to see if someone reproduced my bug
Just in case anyone reads:
I have a ghosted plain (the sun halo), and then lots of ghosted instanced objects (the sun particles).
When the particles go thru the halo, they miss the ghosting:
Wrong with DGDK 7.3, pending to test with 7.4.