Search Unity

Is there a way to get the closest distance between BoxCollider's surface and the vertex?

Discussion in 'Physics' started by okamoto_tomoyuki, Nov 2, 2018.

  1. okamoto_tomoyuki

    okamoto_tomoyuki

    Joined:
    Jan 20, 2015
    Posts:
    9
    There is a vertex outside BoxCollider and its BoxCollider.
    I would like to get the outer vertex and the surface of the BoxCollider closest to that point, not the distance between the outer vertex of BoxCollider and the center point of BoxCollider.
    Is there a good way to do that?
     
    Last edited: Nov 2, 2018
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,372
  3. okamoto_tomoyuki

    okamoto_tomoyuki

    Joined:
    Jan 20, 2015
    Posts:
    9
    Edy likes this.