Terrain Collision

I’ve read some info about terrain, particularly pro-rsoft’s geomipterrain, however I have not been able to find out how to perform collisions with the terrain. (And I don’t mean sticking an avatar to the terrain)

Does anyone know how I could get a collision point off the terrain with GeoMipTerrain?

Say for example I am trying to right click to select a square on the map, is there an fast/efficient way to cast a ray from the camera to the click point having it colliding with the terrain so I can get the XYZ co-ords of the terrain?
I have heard/confirmed that setting an IntoCollideMask is extremely slow (~max 30 fps slow), so I’m wondering if there is another way, such as creating a specialized collision solid for the heighfield every time it is first loaded.


Currently, I think the only way is to either make your own traverser that uses getElevation, or use collision-to-geometry, which is slow.
You could keep two copies of the terrain, one for rendering, and the other that is bruteforce, has a low blocksize and a ‘high’ minlevel - for collision. That would certainly speed up collision a lot.

So can you elaborate on the making my own traverser method?

Specifically, say, for example if I wanted to get the X,Y co-ord from a mouse click on the terrain.

I would have no idea, sorry. I think that would involve polling getElevation along the ray and see if it matches the Z of the ray at that point.