physics: improvements to collision detection