예제 #1
0
	void Awake()
	{
		reference = transform.parent.parent.parent.parent.parent.GetComponentInChildren<ShooterAITransformPositionReference>();
		
		if( elbowTargetType == ArmType.Left )
		{
			transform.parent = transform.parent.parent.parent.parent.parent.GetComponentInChildren<Animator>().GetBoneTransform( HumanBodyBones.LeftLowerArm);
			transform.localPosition = Vector3.zero;
			
			//transform.localPosition = transform.parent.transform.right * 0.2f;
		}
		
		if( elbowTargetType == ArmType.Right )
		{
		
			//Debug.Log(transform.parent.parent.parent.parent.parent.GetComponentInChildren<Animator>().avatar.ToString(), gameObject);
			
			transform.parent = transform.parent.parent.parent.parent.parent.GetComponentInChildren<Animator>().GetBoneTransform( HumanBodyBones.RightLowerArm);
			transform.localPosition = Vector3.zero;
			
			
			
			//transform.localPosition = transform.parent.transform.right * 0.2f;
		}
		
		
		
	}
예제 #2
0
    void Awake()
    {
        reference = transform.parent.parent.parent.parent.parent.GetComponentInChildren <ShooterAITransformPositionReference>();

        if (elbowTargetType == ArmType.Left)
        {
            transform.parent        = transform.parent.parent.parent.parent.parent.GetComponentInChildren <Animator>().GetBoneTransform(HumanBodyBones.LeftLowerArm);
            transform.localPosition = Vector3.zero;

            //transform.localPosition = transform.parent.transform.right * 0.2f;
        }

        if (elbowTargetType == ArmType.Right)
        {
            //Debug.Log(transform.parent.parent.parent.parent.parent.GetComponentInChildren<Animator>().avatar.ToString(), gameObject);

            transform.parent        = transform.parent.parent.parent.parent.parent.GetComponentInChildren <Animator>().GetBoneTransform(HumanBodyBones.RightLowerArm);
            transform.localPosition = Vector3.zero;



            //transform.localPosition = transform.parent.transform.right * 0.2f;
        }
    }