collision detection by depth position