title: How to Calculate Target Destination
body: <p>I'm having a bit of trouble figuring this one out. What I'm trying to achieve is a sort of tackling motion. The player lunges at the target from a distance.</p>
  
  <p><img src="https://i.stack.imgur.com/9eAS7.png" alt="enter image description here"></p>
  
  <p>The diagram shows the set up. The blue diamond is the player and the red thing is the target. The purple box is the renderer bounds of the targets SkinnedMeshRenderer. I'm using renderer bounds because some target's mesh are much larger than other. Currently, the player is shooting to the orange star...which is unrealistic. I want him to, no matter what way the target is facing, always target the closest point of the target relative to his position...in the diagram's case that would be the brown star. Here's the code I've been using...</p>
  
  <pre><code> public IEnumerator Blitz()
  {
      rigidbody.velocity = Vector3.zero; //ZERO OUT THE RIGIDBODY VELOCITY TO GET READY FOR THE BLITZ
      SkinnedMeshRenderer image = target.GetComponentInChildren&lt;SkinnedMeshRenderer&gt;();
      Vector3 position = image.renderer.bounds.center + image.renderer.bounds.extents;
      position.y = target.transform.position.y;
      while(Vector3.Distance(transform.position, position) &gt; 0.5f)
      {
      transform.position = Vector3.Lerp(transform.position, position, Time.deltaTime * 10);
          yield return null;
      }
      Results(); //IRRELEVANT TO THIS PROBLEM. THIS CALCULATES DAMAGE.
      Blitz.Stop(); //THE PARTICLE EFFECT ASSOCIATED WITH THE BLITZ.
      GetComponent&lt;Animator&gt;().SetBool(moveName, false); //TRANSITIONS OUT OF THE BLITZ ANIMATION
      GetComponent&lt;Input&gt;().NotAttacking(); //LET'S THE INPUT SCRIPT KNOW THE PLAYER CAN HAVE CONTROL BACK.
  }
  </code></pre>