Waist rotation causing odd arm rotation

It seems that when applying any rotation to the C0 of the players UpperTorso waist motor, the arms ‘snap’ to an inwards facing direction. Rotations facing either completely backward, or completely forward (the default) seem to both cause the arms to snap back to normal. I’ve tested in X, Y, Z rotations and all appear to result in the same bug.

Video of the bug in action:

The code I used to display this in the command line:

game.Workspace.ColdDeveloper.UpperTorso.Waist.C0 = game.Workspace.ColdDeveloper.UpperTorso.Waist.C0 * CFrame.Angles(0,0.05,0)

Thank you.

7 Likes

I’ve noticed this happen with animations as well, if you play an animation the arms mess up and make the animation look very bad, for a while I thought it was an issue with my animations until I saw this post.

Thanks for the report! We’ve filed a ticket in our internal database.

3 Likes

Can confirm this is happening as well (was just about to report). It occurs in live servers. I made a reproduction place file which shows the issue occurring with a common look-at-mouse use-case:
ArmMotorGlitchRepro.rbxl (35.2 KB)

I noticed it only occurs with the idle animation. Whenever you run, for example, the issue seems to disappear:

1 Like

Thanks for the repro, I managed to find 2 different quick fixes

First is to replace .C0 with .Transform and change from .RenderStepped to .Stepped (Transform timing is batched after this, Motor6D | Roblox Creator Documentation for more info):

local MAX_HEAD_ROT = math.pi * 0.3
local MAX_WAIST_ROT = math.pi * 0.1
local RunService = game:GetService("RunService")
local plr = game.Players.LocalPlayer
local humanoid = script.Parent:WaitForChild("Humanoid")
local neckMotor = script.Parent:WaitForChild("Head"):WaitForChild("Neck")
local waistMotor = script.Parent:WaitForChild("UpperTorso"):WaitForChild("Waist")
local neckC0 = neckMotor.Transform
local waistC0 = waistMotor.Transform
RunService.Stepped:Connect(function()
	local lookVec = (humanoid.RootPart.CFrame * CFrame.new(0, 1.5, 0)):PointToObjectSpace(plr:GetMouse().Hit.Position).Unit
	local xRot = math.sin(lookVec.Y)
	local yRot = -math.sin(lookVec.X)
	neckMotor.Transform = neckC0 * CFrame.fromEulerAnglesYXZ(xRot * MAX_HEAD_ROT, yRot * MAX_HEAD_ROT, 0)
	waistMotor.Transform = waistC0 * CFrame.fromEulerAnglesYXZ(xRot * MAX_WAIST_ROT, yRot * MAX_WAIST_ROT, 0)
end)

Second is to disable the retargeting workspace property (There are some dependencies on the rig structure which get broken when C1 or C0 are modified):

8 Likes

Hey, thanks for the fixes. I appreciate it as I was having this issue as well. I have a question however.

I was looking at this open-sourced skinnned R15 rig and saw it was having this issue too.

Disabling retargeting does fix it on there as well, but I was wondering since retargeting will probably move out of the opt-out phase at some point and become mandatory?

Then will this issue with the arm-rotation be fixed by Roblox before then or is there some other fix for the issue with this skinned rig besides disabling retargeting?

Thank you :slightly_smiling_face:

We’ll only move past retargeting opt-out phase after these issues have been addressed and we’ve observed a sufficient length of time without other problems popping up.

1 Like