Unity's method of obtaining collision position

private void OnTriggerEnter(Collider other)
        {
        if (other != null)
        {
            Debug.Log(other.name);
            _closestPoint = other.bounds.ClosestPoint(transform.position);

             Debug.Log(_closestPoint );
        }
    }

Guess you like

Origin blog.csdn.net/dj1232090/article/details/128898555