[C#]detect object on mouse look?

how can I detect if my camera is looking a object into a trigger?

I have a door. And if the player is into the door trigger and is watching it, he can interact with it.

I only want to know this. Is using MouseToViewPoint or something like this?


use a raycast.