depth sorting of physics elements