Object within bounds of another object

How do I check if an object is within bounds of another object?

I am doing a 2D game and doing some drag'n drop and have check if the object getting dragged is within the bounds of another object. If false the dragged object have to be destroyed.

There might be an easier way than using bounds and since I'm new to Unity I'm open for every kind of solution. I do prefer UnityScript though.

Thanks in advance:)

use built-in mesh colliders like a box collider and set isKinematic to true then do an OnCollisionEnter as referenced in the docs

http://unity3d.com/support/documentation/ScriptReference/Collider.OnCollisionEnter.html?from=Collision

you could also roll your own system but perhaps the above is easier...

Hey - HR - I’d love to know how you did this. I come from Flash too and I don’t really get the collider thing. Did you find a way to do it with bounds? Would much rather do it that way.