adjusted collision detection