public Organ this[AvatarTarget part] { get { return partdic[part]; } }
public override void Reset() { gameObject = null; avatarTarget = AvatarTarget.Body; targetNormalizedTime = null; everyFrame = false; }
public override void OnReset() { targetGameObject = null; matchPosition = Vector3.zero; matchRotation = Quaternion.identity; targetBodyPart = AvatarTarget.Root; weightMaskPosition = Vector3.zero; weightMaskRotation = 0; startNormalizedTime = 0; targetNormalizedTime = 1; }
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; }
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; }
// 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); }
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; }
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); }
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); }
//**********************************************************************************// // 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); }
public void SetTarget(AvatarTarget targetIndex, float targetNormalizedTime){}
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); }
private static void INTERNAL_CALL_MatchTarget(Animator self, ref Vector3 matchPosition, ref Quaternion matchRotation, AvatarTarget targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime){}
public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime){}
public extern void SetTarget(AvatarTarget targetIndex, float targetNormalizedTime);
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); }
private static extern void INTERNAL_CALL_MatchTarget(Animator self, ref Vector3 matchPosition, ref Quaternion matchRotation, AvatarTarget targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime);