I'm experiencing an issue with the animation of my player. I intend for my hand and the gun to follow the direction of my crosshair when I'm carrying a gun. However, the problem arises when my arm stretches, but the gun is not properly held in my hand.

Related Discussions
...

This is the bone:

And this is the code that I applied:
[SpineBone(dataField: "skeletonAnimation")]
public string boneName;
Bone bone;

void start(); {
_sklamPlayerController = _sklamPlayer.GetComponent<PlayerController>();
this.bone = sklamPlayer.Skeleton.FindBone(boneName);
Vector3 worldPosition = bone.GetWorldPosition(
sklamPlayer.transform);
}

    public void Update()
    {
        if (_blnIsHoldingItem)
        {
            if (_sklamPlayerController == null)
                _sklamPlayerController = GetComponent<PlayerController>();

            Vector3 position = _sklamPlayer.transform.InverseTransformPoint(_sklamPlayerController.GetLastAimPosition());
            bone.SetPositionSkeletonSpace(_sklamPlayerController.GetLastAimPosition());
            Quaternion worldRotationQuaternion = bone.GetQuaternion();
        }
    }

@mrhoody213 You have already posted the same question here, please don't post the same question redundantly.

Did you see our reply on the other thread?

Nate a verrouillé la discussion le .