Check which direction the player is rotating in

So what I’m trying to do is play turning animations depending on which direction the player is turning in. The problem is, I can’t find a good way to figure out if the player is rotating clockwise or counterclockwise.

I’ve tried storing the previous frame’s Y rotation to the current frame’s with no luck, I’ve tried an input-based approach with no luck, getting angular velocity didn’t work, I just don’t know how to pull this off.

hope this helps:

	Vector3 angle;
	Vector3 oldangle;

	void Start () {
		angle = transform.eulerAngles;
		oldangle = angle;
void Update () {
		angle = transform.eulerAngles;
		if(angle.y<oldangle.y){print("Im spinning left on my Y axis");}
		if(angle.y>oldangle.y){print("Im spinning right on my Y axis");}
		oldangle = angle;}