Making an object "sticky"?

I’m trying to think of a way of doing this: I have an object I can move around in my 3D world. If I touch another object (a rigid body, so it moves if I bump into it) and I click the mouse, I want the second object to “stick” to the object I’m maneuvering.

Any ideas?

I’m thinking the “trigger” would be a collision plus a mouse click. But how would I make the object “stick”?

My guess would be to make it a child of the other object, e.g.:

object1.transform.parent = object2.transform

Joachim made a sticky grenade script. http://forum.unity3d.com/viewtopic.php?t=1597&highlight=sticky
It might be good to put this on the Wiki :slight_smile: