示例#1
0
    void AdjustShoulder(ShoulderInfo shoulder)
    {
        // both lookPositionRaycasted and Far work, but Far feels better.
        // try the other one and move close to walls while in third person
        // to see the difference.
        shoulder.bone.LookAt(look.lookPositionFar);

        if (shoulder.addInitialRotation)
        {
            shoulder.bone.Rotate(shoulder.initialRotation.eulerAngles);
        }
    }
示例#2
0
    void AdjustShoulder(ShoulderInfo shoulder)
    {
        Quaternion lookRotation = Quaternion.LookRotation(look.lookPositionFar - shoulder.bone.position);

        shoulder.bone.rotation = lookRotation * shoulder.initialRotation * Quaternion.Euler(shoulder.rotationOffset);
    }