Crosshair to create widget when I look at something

I’m trying to make a UI appear when I look at an object and when I look at it for a couple of seconds a UI is shown and displays information about something. I’m trying to get this working but not sure how? I’ve made a basic crosshair and now just looking to make this work when I look at something for long enough it creates the UI widget. Any help?

You may use line trace from camera location and the look direction, if it detects the collision with desired object then you may show it.

Hi

I’ve made a video to help you