And intersect works - just not the fastest... sparky's is faster but I agree you'll have to do some hunting but I do have a DarkGDK snip - that shouldn't be all that hard to translate:
//-----------------------------------------------------------------------------------------
// Coords start at 0,0 - From Top Left - if facing north and Object is rotated 0,0,0
// furthest on left is 0,0
float GetGroundHeight(int p_MemID, float p_X, float p_Z){
//-----------------------------------------------------------------------------------------
int ObjectID=dbMemblockDword(p_MemID,0);
float Height=dbIntersectObject(ObjectID,p_X,10000,p_Z,p_X,-10000,p_Z);
if(Height==0){
return 0;
}else{
return 10000-Height;
};
};
//-----------------------------------------------------------------------------------------
Now in Less C++'ish pseudo code:
Height#=Intersect Object (GroundObjID, X#, 10000, Z#, X#, -10000, Z#)
X and Z are where you are checking ground height. The test works by starting 10000 units straight up from this x,z position, and shoots a ray down x,z (but -10000) and you'll get the Y returned to you where the Ground is.
Now if you're dealing with walking over a ton of objects - you would need to test each object's height and go for the heightest value returned for that object ... Here I'd switch to sparky's, as you can have groups of objects and do one test versus multiple.
Good Luck