How to line trace from the viewport in C++?

In unreal actors have OnClicked event so dont need to setup ione tracing if you want , it requires conclusion on actor