If object A collides with object B, then obviously object B collides with object A. So collision detection should be checked only on one of the two objects, not in both.
So, let's say A checks for collisions, finds it collided with an object and needs to identify the objects it collided with (B in this example).
If A and B are sprites this is trivial, but what if A and B are clones (possibily of different sprites, think about targets and bullets)?
I'm aware of the technique of identifying the colliding clone described in Collision detection with clones (ID recognition), which basically runs a full scan of the clones (or neighbors) list checking each element for collision, which surely does work but it seems quite inelegant.
I was wondering if there is a more direct way for a sprite/clone to find the clone it just collided with. Ideally, there should be a reporter block that returns the clone that collides with the caller object, if any.
Any suggestion is welcome.
Thanks!