Variable direction and follow player with the head

I am trying to obtain the variable direction so that the head of my enemy points directly towards the player but I am very lost and I need help, any information would help me a lot

][2]alt text

The simplest way - just to

  • calc direction vector: direction = PawnActor->GetActorLocation() - TargetActor->GetActorLocation()
  • calc rotation rot with for example Make Rotation from Axes node
  • set corresponding bone rotation (it depends on skeleton that is used)

Thank you very much for the answer, I don’t understand much about c ++, is there a way to do it with blueprints or am I confusing? I’ve been with this problem for a long time and I’m a bit lost, again thanks a lot for the help

i try this but doesn’t work

okey now its working !!!