How i can initialize а gravity?

You could use the Bullet engine for collision detection and physics and this: [New Bullet Character Controller) for the character. The character controller is kinematic – it only uses collision detection, not physics.