changing gravity so i can walk on to a cube on all sides

hy all, i am tryng to do a simple game based on the fractal tutorial provided by the catlike user , here is a link(http://catlikecoding.com/unity/tutorials/constructing-a-fractal/) …

i want to put an third person controller on it so that it can start at the base of the fractal and then climb to one of it’s ends. i want to do it so that i can stay stick on the surface of any of the sides of the fractal. i understand if it’s a sphere you can use universal gravity formula, but how you use it on a cube 6 sides.

how can i make the transition betwen gravity change?

thank you bye bye.

The CharacterController doesn’t work in this case because it needs Y to be the normal direction. Best way to do this is to access rigidbody and uncheck use gravity, apply a local gravity in the form of a constant force opposite to the character normal direction - the character normal must be updated using a raycast to the down side.