I am creating a 2D action platformer and want to create some steering behavior for a mage enemy.
Basically, I want the mage to smoothly wander inside an annulus centered on my player.
Below is an image depicting an example path the mage could follow.
The enemy currently has simple seek behavior. It simply accelerates toward whatever is set as its target.
I tried choosing a random target point in the annulus every so often, but when you do this, the enemy sometimes drifts across the center of the annulus to reach a point chosen on the other side.
So my question is, how can I achieve the desired movement?