Revert "Reverting the 3d collision detection stuff.  I am not smart enough to get this working in a timely manner. :("

This reverts commit d7954ec2cc2740e118fc2f03e44bd013b67142e2.