Line trace to trigger events? C++

watch this. How To Do Line Tracing Using C++ In Unreal Engine - YouTube