Aludur. you suggestion on my question 2 is good. i had a play around with the code. problem is that its aiming is a bit off.
ScreenShot - attached
from the screen shot it shows my problem.
the given point not were its sposed to be.
i don't make much sense of this.
heres the code that you gave me.
void CTerrain::TerrainEditPoint(int x, int y)
{
//int varibles
int pick = dbPickObject(dbMouseX(), dbMouseY() , 1 , 2 );
float dist = dbGetPickDistance();
dbPickScreen(dbMouseX(), dbMouseY(), dist);
float(camx) = dbCameraPositionX(1);
float(camy) = dbCameraPositionY(1);
float(camz) = dbCameraPositionZ(1);
float px = dbFloor(dbGetPickVectorX() + camx);
float py = dbFloor(dbGetPickVectorY() + camy);
float pz = dbFloor(dbGetPickVectorZ() + camz);
dbCenterText(768,0,dbStr(px));
dbCenterText(768,12,dbStr(py));
dbCenterText(768,24,dbStr(pz));
dbPositionObject(96,px,py,pz); //position object at point
}
EDIT: Found the screen shot file. see attached.
Problem Solution That Never Fails: "Build A Bridge And Get Over It"