In this clip, while the UpperTorso is upright, the rotation works properly, but when crouch, the UpperTorso is tilted forward, but the rotation of the UpperTorso is only applied to object space Y. I want it to rotation the joint on the world space, but when I tried, the rotation is no longer relative to the body and look direction.
Sadly, Due to the nature that the character is R6 You most likely won’t be able to get that perfect upright stance you’re looking for, furthermore you can attempt to snap the torso into two parts and label them UpperTorso and LowerTorso.
I’ve tried messing around with toObjectSpace with the RootPart’s CFrame without the position vector or using the UpperTorso’s Orientation into CFrame.Angle with math.rad to add use with toObjectSpace but yeah, result was my UpperTorso spinning non stop. Hahah.
The thread should add some context. Instead of rightVector, use upVector instead. pitch would be whatever angle you rotate the torso with in the y-axis.
Here’s another issue related to the world and object space rotation. Ignore the idle animation but the neck and arms is working fine if the character’s waist c1 is not rotated, but after it’s rotated, the rotations of the neck and arms are relative to the UpperTorso, which isn’t what I want. I want it to rotate relative to the lookVector of HumanoidRootPart.
local direction = rootPart.CFrame:vectorToObjectSpace(camera.CFrame.lookVector)
local radian = math.atan2(direction.X, -direction.Z);
-- < some clamping code here > --
LerpBody(
CFrame.new(originaldata.NeckC0.p) * CFrame.Angles(mouseProperties.Y, math.clamp(-radian*0.5, -0.3, 0.3)+characterProperties.Joints.WaistY, 0),
CFrame.new(originaldata.RightShoulderC0.p) * characterProperties.Joints.RightShoulderAngle,
CFrame.new(originaldata.LeftShoulderC0.p) * characterProperties.Joints.LeftShoulderAngle,
CFrame.new(originaldata.WaistC1.p) * CFrame.Angles(characterProperties.Joints.WaistX, radian+characterProperties.Joints.WaistY, 0)
, 0.1);
I’ll keep trying in the mean time, if anyone has overcome this issue before, I’d like to hear about it.