Make a vigilance camera follow player

Hi there, i’m trying to come up with a blueprint script to make a vigilance camera follow my player character, but it’s not being easy.
Heres what i though so far:

  • I’m using an actor blueprint, where i attached a pawn sensing, and everytime it senses the player it rotates from the Z axes.

I used this script:

My problem is that my the camera is always rotating, instead of always following the player.
Can anyone help me solve this problem?

Thanks in advance

Do you have any code that sets the camera back to the rotation where it looks like it’s following the player, once the lookatenemy part is done? Maybe it’s just that you didn’t implement that yet. I don’t see it doing that in the code you provided a screenshot of.

I did not do that, i will try it. Thanks