raycasting for terrain testing.