How to change rigs spine rotation?

I have a rigged 3d model of a person with animations that i made. It is a player model in a first person shooter. I want this model to “bow”, when looking down or do the opposite, when looking up. To achieve this, i decided, instead of making an animation for each degree the player might decide looking at, to rotate models spine, depending on the angle of the camera. In scene view, i can easily change rotation value and get the results i want, however, when game is running, those parameters seem to be “locked” and no matter what script i tried, i cant seem to change the rotation value.
I figured, perhaps, when animation is playing, i cant change things it effects, so made a body mask to excluded torso from animations and spines rotation was still locked away from me.
Is there a way to rotate models spine, when its doing its normal, lets say, idle, animation? is there actually another easy way to achieve this?

You really ought to include code in your question to get the best response. I’m going to have to make assumptions to answer your question. Right now, I’m assuming you’re trying to change the value in the Update function.

The animators run their code after MonoBehaviour Update functions are run, so if you change the value there, it will be overwritten by the animation itself. You could use an animation mask to tell the animators not to animate that particular bone, but the easier way would be to move your code into LateUpdate function. This should change it after the animator has done it’s stuff, but before it’s rendered, allowing you to have dynamic control on top of the base animation.

@FortisVenaliter I’ve searched everywhere and cant find the answer to how you make you players spine move up and down with vertical camera movement. This script makes my spine move up and down but it twists my back in weird ways. I attached this script to my spine bone segment. I’ve tried rotating on a different axis and everything else i could think of. If you can provide me with a code or fix this it would be appreciated.

public Transform Spine;

void LateUpdate()
{
    Spine.rotation = Quaternion.LookRotation(Camera.main.transform.forward, Spine.up);

    Spine.transform.Rotate(0, 0, 30);
}