I have a player object being chased in rotation by an enemy object. The player object is rotating around the z-axis at Vector3.zero. The enemy object is rotating in the same plane further along z.
I can get the enemy object to chase the player rotation with Quaternion.Slerp(transform.rotation, GameObject.Find("Player").transform.rotation, rotate * Time.deltaTime);
But what I would like is for the enemy to accelerate and decelerate its rotation, so that it takes time to catch up, then overshoot a bit, so that I get some interesting movement. I was thinking of using transform.Translate(0, 0, rotate * Time.deltaTime, Space.World); and have the rotate value rise or fall at regular intervals using Time.time depending on if the Player is nearest clockwise or anti-clockwise.
How do I tell if an object is nearest clockwise or anti-clockwise?