Those kind of issues can be complicated and but basically it sounds like you'll need more feedback from the environment for the character to know what to do.
You might need to add "sensors" to your character, for example by doing raycasts that find out what objects/layers/areas are in front or below, then change their behavior to react to certain things.