Hi,
I am following this video to achieve the functionality that when I press a key, the camera can focus on the selected actor.
But I meet a problem when I follow this tutorial. I am writing these codes in the spectator blueprint. When I press the key, the spectator will go to the location of the selected actor which means inside the actor. I tried some way to calculate the distance between camera and actor or divide the location but none of them works.
I want to achieve the focus functionality like the one in the editor, press F, and close to the actor. Here is my code.
Thanks for your help.