Sample collision detection implemented.