How to add body rotation once camera reaches a rotation limit (free look within bounds)?

So we’re going for realistic first person gameplay. I have a camera in first person view set to a spring arm that’s really small, and that is set to control the rotations of the head and neck bone of my character, as opposed to the rotation of the entire body of the character like in most fps games. We want to have a little bit of a freedom of head movement within a certain bounds. Once the character starts turning past, say, 45 degrees left or right we want to have the body rotate with it at that point, but between that 90 degree space only the head will move.

A few things I’ve tried:
Reading the relative rotation of the spring arm from the parent actor, and adding actor rotation when relative rotation was past a certain angle. this mostly worked when you are simply turning the head, but you could over turn the camera if you spun the camera fast enough around by moving the mouse too fast. Adding more rotation to counteract this doesn’t help. Also, rotation was affected by the Run Animation set to the character (spring arm is attached to Head Socket, and when running there’s head bobbing which affects the relative rotation enough that the body tries to fix itself and spins endlessly. If I unsocket the spring arm it might help, but then we lose head bobbing that would probably have to be introduced later down the road somehow for realism).

I recently (see below) tried to do a compare of the head socket with the actor rotation, and used a while loop to solve the over-turning issue when moving the mouse too fast. Can’t get this to work right either. Rotating the wrong way, while loop errors, etc after testing out different values and flipping nodes and stuff.

At one point tried using Get Player Camera Controller and setting a Yaw Min/Max, then was going to read a value once The limit was reached. Couldn’t get that off the ground, wouldnt let me see anything more than in front of me even though I think the body rotation updated. Similar method might work with a clamp, haven’t tried that all too much but I remember someone saying that Use Controller Rotation should be unchecked and that is how I control the spring arm so idk how well that will work.

Honestly I can’t spend much more time on this. Team needs me to start implementing some attack animations and blendspaces to make something playable soon and i’ve been stuck on this one little thing for the past few nights between work. If anyone has any ideas at all, I’d really appreciate it. Maybe I’m over thinking it, or I’m missing something.

This is how I set up the mesh’s head socket rotation, and this (below) is what I’m currently working with on the playerBP side of things

Thanks in advance for any help

tldr: With the head rotation unlocked from body rotation, I need the entire character to start rotating again with the camera once I get to a limit without being able to break my character’s neck if I turn too fast.

So I may have found a somewhat functional solution. I got forward vectors for the camera and player mesh, broke them down to use only the x/y plane vectors, used some a custom function that implements some trigonometry to calculate the angle between the vectors, and set up a compare with less than/greater than to implement limits. I can still over turn if I move the mouse too quickly, however I no longer have an issue with the run animation spinning out of control.

here’s the mostly-semi-functional solution:

and the custom function I implemented to calculate vectors:

Guess I just have one thing left to solve, being able to turn too fast. Won’t be an issue on gamepads I imagine, but for PC I want this on point. So. Next question: Is there any way to track mouse speed? I’d like to simply use the rotation to lock and unlock the “use yaw” controller on the character mesh so the actor sticks with the mouse speed when it moves too fast. Eh well I’ll post a new question topic question later if I can’t figure it out.