Well, it ALMOST worked.
But the objectZ seems doesn't change at all.
So it position my object incorrectly.
However, I don't understand what the code did with the math :S
if(dbMouseClick() == 1)
{
if(!dbObjectExist(302))
dbMakeObjectCube(302, 5.0f);
mouseX = dbMouseX();
mouseY = dbMouseY();
dbPickScreen(mouseX, mouseY, objectZ - cameraZ);
vectorX = dbGetPickVectorX();
vectorY = dbGetPickVectorY();
vectorZ = dbGetPickVectorZ();
vectorX /= vectorZ;
vectorY /= vectorZ;
vectorX *= objectZ - cameraZ;
vectorY *= objectZ - cameraZ;
vectorX += dbCameraPositionX(700);
vectorZ += dbCameraPositionY(700);
dbPositionObject(302, vectorX, vectorY, objectZ);
}
Well, I think this is a different problem.
From the link you given, the object will only follow the mouse's x and y coordinates and ignoring the distance from the camera to the pointed area (z coords).