While I have your attention, does anyone know the fastest way to get a terrain height anywhere along it's surface?

terrain_height (ENTITY_T* terrain, VECTOR* position); only returns the nearest vertice and c_trace is a bit tricky to work with since I have multiple terrains in the game.

entity.floor_dist seems ideal but only shoots downwards and doesn't return the terrain pointer.

I need a very accurate method for the transition from underwater to above water on a moving terrain (water) with a second terrain representing the bottom/ground and an inverted object as the underwater surface.


A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm