Rotating Biped's Upper Body seperately from the Lower Body

Hi guys;

I’ve modified the default Third Person Shooter code to the point where only a small fraction of what’s left is the default part. I have a segment within the code that allows for aiming in Third Person.

 Character.transform.rotation = Quaternion.Euler(gameObject.transform.eulerAngles.x,Camera.main.transform.eulerAngles.y,0);

    
BodyUpperPart.transform.rotation = Quaternion.Euler(Camera.main.transform.eulerAngles.x,Camera.main.transform.eulerAngles.y,0);

So the first part works perfectly, but the second part rotates my character’s upper part in the wrong axis. I’ve changed the code so it applies to x y and z but the problem seems to be unsolved.

Character is the main model and for BodyUpperPart I assign one of the Spine Bones. I’m sure that there’s a very simple fix for this problem but I haven’t been able to figure it out…

Thanks in advance!

Im pretty sure the only reason the second didnt work is because you havn’t defined what UpperBody is and the camera

To set the variables below to whatever they need to be :slight_smile:

`
var UpperBodyObject : Transform = "Chest";
var CameraObject : Transform = "Cameras";

Character.transform.rotation = Quaternion.Euler(gameObject.transform.eulerAngles.x,Camera.main.transform.eulerAngles.y,0);

UpperBodyObject.transform.rotation = Quaternion.Euler(CameraObject.main.transform.eulerAngles.x,CameraObject.main.transform.eulerAngles.y,0)
`