Function for collision testing

Metacode only so far