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;
}