Mouse tracker Animation problems

Anyone know why mouse tracker follows the animation on the incorrect axis?
We’re having it so the whole upperbody moves but we’re not sure.

If i’m not mistaken this should be the code.

There’s not a lot of help that you’re going to get unless you provide code. Specifically where the problem seems to be occurring; we can’t guess where the problem is based off of a short gif.

Updated. Hopefully it helps this is all I currently have. I know a way to fix the issue but I don’t think he wants to do it. We were going to add an invisible part for the mouse to track while the animation runs on everything else on the upper body. When he gets off of work I’ll ask him to show me the rest of the code.

Like so.

I have this question for myself not really him, he’s dead set on using what we have currently I just feel it can look a lot better if we’re able to animate the rest of the torso instead of always having it face in a forward position.

Did you expect the arms to remain roughly horizontal while the rest of the upper body rotates with the camera/mouse? From the gif you showed, this is the behavior I would expect given the script you provided.

EDIT: In other words, can you describe what you want to happen? Your script is rotating on the X-axis, and you’re also calculating the pitch of the mouse relative to the horizontal. Did you perhaps expect the player to rotate left and right instead or something?

We’re trying to get the upperbody to go on the Z axis but we think the animation might be causing it to tilt when we hit a certain degree. Reason being we have a new animation where the upperbody is facing front and it stays on the correct axis when tracking.

Were you expecting this:

Instead of this:

(in both demonstrations, the rotation of the HumanoidRootPart is locked to the camera)

1 Like

I don’t understand what’s the problem? The .gif looks fine to me.

Yes we’re trying to keep the body forward while the animation runs when tracking the mouse.

The entire upper body tilts to the x axis when it should be going up and down the z axis unless the player has moved the mouse to the right or left when ADS.

We currently haven’t made any mechanics for ADS because we’d like to get this portion to work better.

Here’s what I did. pitch in this case would be your answer. waist is your LowerTorso->UpperTorso.

waist.Transform = CFrame.fromAxisAngle(
    pitch) * waist.Transform

Thanks for the assistance! Much appreciated.