JonasMolgaard/UBIKSolver

Shoulder rotating back math is inconsistent with VRIK

sclark39 opened this issue · 0 comments

While determining if the shoulder should be rotated back towards the hand, 0.08 is the distanceRatioThreshold. To create an area about 0 which has no rotation, within the range [-0.08, 0.5] it should be adding 0.08 not subtracting (since ForwardDistanceRatio is negative here).

const float TempYaw = (ForwardDistanceRatio - 0.08f) * Settings.DistinctShoulderRotationMultiplier;

(As an aside, VRIK actually had its own bug in this section but because the default back shoulder limit was 0, it didn't matter.)