I have an object that parents an object whenever it collides with it (using OnCollisionEnter). However there can be some significant distance between the two colliders. Is there anyway to fix it so it collides when the colliders touch? Here is the relevant code.
void OnCollisionEnter(Collision collision)
{
Collider otherObject = collision.gameObject.GetComponent<Collider>();
otherObject.gameObject.transform.parent = gameObject.transform;
otherObject.enabled = false;
}