How to change gravity with a trigger?

I want to change the direction of gravity if you hit a certain object.
And the character controller must turn with the gravity so his underside is always facing in the direction of the current gravity.

You may have two ways I see. first you disable the engine gravity and apply your own to the character (if he is the only being involved in the change of gravity).

or you can change the gravity manually:

Physics.gravity.y = -Physics.gravity.y;

In the second case, all rigidbodies will fall down if they have IsKinematic off.

Physics.gravity is a vector3 so you can also modify the values of each three components so that either you get a moon gravity or to the side or else. A little like Gravity Rush.

EDIT: To create gravity with script:
it is all there: