Unity 3D OnMouseDrag collision
<p>I am trying to make a game where you drag different types of spheres and put them together to form a figure (without any gravity). For dragging the objects I use this script:</p>

<pre><code>using UnityEngine;
using System.Collections;

public class Test : MonoBehaviour {

    void OnMouseDrag()
    {
        float distance_to_screen = Camera.main.WorldToScreenPoint(gameObject.transform.position).z;
        transform.position = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, distance_to_screen ));

    }

}
</code></pre>

<p>When I drag two spheres to eachother they go trough eachother. I added a rigibody to the objects, tried a LOT of different things with it, but nothing seemed to work. They always seem to bounce off eachother OR they just don't collide at all. Any sollution to this? Imagine this like a person running in to a wall. The person doesn't bounce off the wall, he just stops moving.</p>