ow i remember this, i had a post a while back about this.
Heres the Code
void TerrainFind3DPoint()
{
//int varibles
int pick = dbPickObject(dbMouseX(), dbMouseY() , 1 , 2 );
if (pick>0) {
float dist = dbGetPickDistance();
dbPickScreen(dbMouseX(), dbMouseY(), dist);
float(camx) = dbCameraPositionX(1);
float(camy) = dbCameraPositionY(1);
float(camz) = dbCameraPositionZ(1);
float px = dbGetPickVectorX() + camx;
float py = dbGetPickVectorY() + camy;
float pz = dbGetPickVectorZ() + camz;
dbPositionObject(95,px,py,pz);
dbPositionObject(96,px,py+0.5,pz);} //position object plane at point
}
this is to find a 3d point. try it. i think this is what your after
Problem Solution That Never Fails: "Build A Bridge And Get Over It"