More advanced collision detection