Melee Auto Targeting when attacking

Im working on a melee game Third Person(over the shoulder), similar to god of war 5. I have a targeting system that uses a raycast to pick an actor infront of the player and then finds its look at rotation and rotates to it. The problem is the system is slow, jumpy and locks off the target. Does anyone know a better way to do auto melee targeting so the game is easier to play?