Set actor rotation relative to the player position

I’ve been searching for a solution for like an hour and I couldn’t find one, which is kind of strange since it is supposed to be a common implementation in games, so does anyone know how to solve it?

I’ve tried to use the idea of the dot product to see how far the actor needs to rotate until theta is equal to zero or the cos of theta equals one, but it didn’t work quite as well. :sob: