Ejemplo n.º 1
0
        public bool SetP3IkTarget(GameObject obj, ref bool weaponHasIk)
        {
            var ret = false;

            if (!ThirdPersonIncluded)
            {
                return(false);
            }
            Transform leftIKP3 = null;

            if (obj != null)
            {
                leftIKP3 = BoneMount.FindChildBoneFromCache(obj, BoneName.AttachmentLeftIKP3);
                ret      = null != leftIKP3;

                if (leftIKP3 == null)
                {
                    leftIKP3 = BoneMount.FindChildBoneFromCache(obj, BoneName.WeaponLeftIK);
                }

                weaponHasIk = null != leftIKP3;
            }

            _ikControllerP3.ClearAllIKTarget();
            _ikControllerP3.SetIKGoal(AvatarIKGoal.LeftHand);
            _ikControllerP3.SetSource(AvatarIKGoal.LeftHand, leftIKP3);

            return(ret);
        }
Ejemplo n.º 2
0
        public void SetP1IkTarget(GameObject obj)
        {
            if (!FirstPersonIncluded)
            {
                return;
            }
            Transform leftIkP1 = null;

            if (obj != null)
            {
                leftIkP1 = BoneMount.FindChildBoneFromCache(obj, BoneName.AttachmentLeftIKP1);
                if (leftIkP1 == null)
                {
                    leftIkP1 = BoneMount.FindChildBoneFromCache(obj, BoneName.WeaponLeftIK);
                }
            }

            _ikControllerP1.ClearAllIKTarget();
            _ikControllerP1.SetIKGoal(AvatarIKGoal.LeftHand);
            _ikControllerP1.SetSource(AvatarIKGoal.LeftHand, leftIkP1);
        }