示例#1
0
 /// <summary>
 /// return closest point IF point is not bellow with the settings set to false
 /// </summary>
 /// <param name="k"></param>
 /// <param name="canApplyGravity"></param>
 /// <returns></returns>
 public bool GetClosestPoint(Vector3 k, ref Vector3 closestPoint)
 {
     closestPoint = Vector3.zero;
     if (!_plane.AllowBottom && !_plane.IsAbove(k))
     {
         return(false);
     }
     closestPoint = ExtPlane.ProjectPointInPlane(_plane, k);
     return(true);
 }