Slighly modified collision detection so that it correctly detects walking on slanted surfaces