OnCollisionEnter... can it be fired from outside the object?

I would like to have an empty GameObject that has a script attached, and in that script, it tests whether or not one object has collided with another.

Up until now, I’ve only been putting my collision scripts inside one of the objects that’s actually doing the colliding… is it possible for the collision to be tested externally?

In my mind, the code would be something like this (in very broken code):

if (object.OnCollisionEnter(collision: Collision)) {
    //object.DoSomething;
    //collision.DoSomething;
}

Well, you could put a script on the object that gets the OnCollisionEnter() message that does this:

var targeti : GameObject;

function OnCollisionEnter(hit : Collision)
{
   targeti.SendMessage("OnCollisionEnter", hit);
}

Thanks… that at least gives me enough of a headstart to think about my problem differently.

Still, it would be nice to be able to test if objects had collided with one another without the script having to be on one of the objects itself.