Generating a terrain composed of right-angle-triangle quads, I'm able to get the height of the terrain given an arbitrary XY position utilizing barycentric coordinate calculations instead of typical line trace collision response data. This example finds the overlapped triangle of the given point without any broad-phase + narrow-phase optimizations, but it is still incredibly fast. The green debug diamond highlights the centroid of the overlapped triangle, the pink line visualizes the triangle face normal, and the red line & point mark the intersection point & path to the actual arbitrary point in space, which is being moved around on the XY plane.
You can find the code here:
https://github.com/hippowombat/Baryce...