How to add a mesh collider to a terrain

Hello, I have a terrain that I am using with the HTV VIVE PRO EYE. This VR hardware allows to track where the user is looking at but, for that, objects need to have a collider. Terrain collider seems not to work so I want to use a mesh collider. The problem is that if I add the mesh collider I need to add a mesh but I don’t know how to obtain the mesh of a terrain generated in Unity. Any help?

Thanks!

Hi, how about putting some invisible collider objects on the different parts of the terrain the user should be able to look at, or select? Or was the intention to detect whether the player are looking at the terrain, or not?

The intention is to detect if the player is looking at the terrain or not and get the point where the user is looking at

is the source code available for that eye tracker? i mean raycast should work on terrain also…

if nothing else, create high resolution plane mesh, and conform its vertices into terrain.
(can place it over the terrain, raycast down from each vertex position, move vertex to hit point)

Yes there is source code, I am debugging it to see what is happening. If i can’t find the problem your solutions seems great, I will try.

Thanks!