コード例 #1
0
ファイル: AvatarAsset.cs プロジェクト: KumoKyaku/MMDARPG
 public Organ this[AvatarTarget part]
 {
     get
     {
         return partdic[part];
     }
 }
コード例 #2
0
		public override void Reset()
		{
			gameObject = null;
			avatarTarget = AvatarTarget.Body;
			targetNormalizedTime = null;
			everyFrame = false;
		}
コード例 #3
0
ファイル: MatchTarget.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     targetGameObject = null;
     matchPosition = Vector3.zero;
     matchRotation = Quaternion.identity;
     targetBodyPart = AvatarTarget.Root;
     weightMaskPosition = Vector3.zero;
     weightMaskRotation = 0;
     startNormalizedTime = 0;
     targetNormalizedTime = 1;
 }
コード例 #4
0
		public override void Reset()
		{
			gameObject = null;
			bodyPart = AvatarTarget.Root;
			target = null;
			targetPosition = new FsmVector3() {UseVariable = true};
			targetRotation = new FsmQuaternion() {UseVariable = true};
			positionWeight = Vector3.one;
			rotationWeight = 0f;
			startNormalizedTime = null;
			targetNormalizedTime = null;
			everyFrame= true;
		}
コード例 #5
0
 public override void OnReset()
 {
     if (matchPosition != null) {
         matchPosition.Value = Vector3.zero;
     }
     if (matchRotation != null) {
         matchRotation.Value = Quaternion.identity;
     }
     targetBodyPart = AvatarTarget.Root;
     weightMaskPosition = Vector3.zero;
     weightMaskRotation = 0;
     startNormalizedTime = 0;
     targetNormalizedTime = 1;
 }
コード例 #6
0
    // AvatarTarget�Ƀ}�b�`�������ʂ̐ݒ��s��
    void Match(Transform target, AvatarTarget type)
    {
        animator.MatchTarget(
            target.transform.position,
            target.transform.rotation,
            type,
            new MatchTargetWeightMask(Vector3.one, 1f),
            1);

        if (!animator.IsControlled(target))
            Debug.LogError("avatar is not controlled target: " + target.name);
        else
            Debug.Log("controlled: " + target.name);
    }
コード例 #7
0
 public override void Reset()
 {
     this.gameObject = null;
     this.bodyPart = AvatarTarget.Root;
     this.target = null;
     this.targetPosition = new FsmVector3
     {
         UseVariable = true
     };
     this.targetRotation = new FsmQuaternion
     {
         UseVariable = true
     };
     this.positionWeight = Vector3.one;
     this.rotationWeight = 0f;
     this.startNormalizedTime = null;
     this.targetNormalizedTime = null;
     this.everyFrame = true;
 }
コード例 #8
0
        public virtual void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget target, MatchTargetWeightMask weightMask, float normalisedStartTime, float normalisedEndTime)
        {
            if (animator.isMatchingTarget || animator.IsInTransition(0))
            {
                return;
            }

            float normalizeTime = Mathf.Repeat(animator.GetCurrentAnimatorStateInfo(0).normalizedTime, 1f);

            if (normalizeTime > normalisedEndTime)
            {
                return;
            }

            animator.MatchTarget(matchPosition, matchRotation, target, weightMask, normalisedStartTime, normalisedEndTime);
        }
コード例 #9
0
 public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, [UnityEngine.Internal.DefaultValue("1")] float targetNormalizedTime)
 {
     Animator.INTERNAL_CALL_MatchTarget(this, ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime);
 }
コード例 #10
0
    //**********************************************************************************//
    // MATCH TARGET																		//
    // call this method to help animations find the correct target						//
    // don't forget to add the curve MatchStart and MatchEnd on the animation clip		//
    //**********************************************************************************//
    void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget target, 
        MatchTargetWeightMask weightMask, float normalisedStartTime, float normalisedEndTime)
    {
        if (animator.isMatchingTarget)
            return;

        float normalizeTime = Mathf.Repeat(animator.GetCurrentAnimatorStateInfo(0).normalizedTime, 1f);
        if (normalizeTime > normalisedEndTime)
            return;

        if(!ragdolled)
        animator.MatchTarget(matchPosition, matchRotation, target, weightMask, normalisedStartTime, normalisedEndTime);
    }
コード例 #11
0
		public void SetTarget(AvatarTarget targetIndex, float targetNormalizedTime){}
コード例 #12
0
        public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime)
        {
            float targetNormalizedTime = 1f;

            Animator.INTERNAL_CALL_MatchTarget(this, ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime);
        }
コード例 #13
0
		private static void INTERNAL_CALL_MatchTarget(Animator self, ref Vector3 matchPosition, ref Quaternion matchRotation, AvatarTarget targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime){}
コード例 #14
0
		public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime){}
コード例 #15
0
 public extern void SetTarget(AvatarTarget targetIndex, float targetNormalizedTime);
コード例 #16
0
ファイル: Utilities.cs プロジェクト: nicorivas/game1
        public static bool MatchTarget(this Animator animator, Vector3 targetPosition, AvatarTarget avatarTarget, float startNormalizedTime, float targetNormalizedTime)
        {
            if (animator.runtimeAnimatorController == null)
            {
                return(false);
            }

            if (animator.isMatchingTarget)
            {
                return(false);
            }

            if (animator.IsInTransition(0))
            {
                return(false);
            }

            MatchTargetWeightMask weightMask = new MatchTargetWeightMask(Vector3.one, 0f);

            animator.MatchTarget(
                targetPosition,
                Quaternion.identity,
                avatarTarget,
                weightMask,
                startNormalizedTime,
                targetNormalizedTime
                );

            return(true);
        }
コード例 #17
0
 private static extern void INTERNAL_CALL_MatchTarget(Animator self, ref Vector3 matchPosition, ref Quaternion matchRotation, AvatarTarget targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime);