I am trying to make a simple 3d platform game. The issue I'm having is with the collision detection and response. I am currently representing my player character (for wall and floor collisions) with a sphere.
I employ a simple gravity force and directional forces using the arrow keys for movement.
My problem occurs when I come to an edge (like a cliff). I slide over the edge like a ball would, but the behaviour I'm looking for is to fall off the edge like an upright cylinder. A boolean "I am on the platform, or I am not on the platform", and not "I'm sliding off the edge gradually".
The problem with using an upright cylinder is that sliding up stairs automatically becomes impossible, and when walking along any kind of slope, the cylinder must either touch only by one edge, or be partially embedded in the slope.
What is a good collision representation of the player character in a 3d platform game?