If you are looking for a very simple method, make a custom Player Character and a custom NPC Character
Give the NPC Character a boolean variable named “bLookedAt”
Inside the Player Character create a variable of the same type as the NPC Character and name it “LookedAtCharacter”
Fire a line trance from Camera->WorldLocation to the Camera->WorldLocation+((Camera->Forward Vector) * (10000))
Break the “Hit Output”
Get a reference to the “LookedAtCharacter” Check if it “IsValid”. If it is then set it’s “LookedAt” variable to false.
After that and if it is not valid, continue both paths to the next step.
Cast the “Hit Output” “Hit Actor” to the NPC Character.
If the cast is successful then set the NPC Character “bLookedAt” variable to true and set the “LookedAtCharacter” in the Player Character to the cast NPC Character.
Let me know if this works or if you have any more questions.