Coding simple AR on click

I’m struggling to get started with C++ development for AR projects, particularly interactivity. Quite simply, I want to be able to detect when an actor or pawn is clicked on.

I know that BPs can mostly do what I want (and that BP_ARPawn demonstrates what code for interactivity would look like), but I’m keen to understand what the C++ equivalent would look like. Parsing the BP into C++ has given me dense .cpp and .h files I’m struggling to understand.