Edit character controller to allow dynamic gravity

Hi Everyone, I’m relatively new to unity 5. I’m trying to make a game where you can walk on walls and the roof. but so far my character collides with the roof or wall and remains in a “falling state”. I’m trying to write a custom character controller which allows this. but I’m clueless on how to do this. this video on Unreal engine 4 is exactly what I’m trying to do (

@ 2:05). Please if anyone can help me achieve this I would be so grateful. Been stuck for days now. This is the concept :

might help:

Hi i have seen that and done it. the problem with that is that it gives a central point of gravity, and not directional. so for a wall the gravity pulls me to a point in the wall same with a roof.