How to apply gravity and collision to character controller

Hi, I’m pretty new in using unity. I have been trying to make simple a top down shooter game.

The script I’m using to move the tank around is this

#pragma strict
var Tank:Transform;
var acceleration: float=1;
var maxSpeed: float;
var rAcc: float=0;
var maxTurnspeed: float=100;
function Start () {


function Update () {
	//Tank movement
	if (Input.GetAxisRaw("Vertical")==1){
 		if (acceleration < maxSpeed) {
		acceleration += 1;
 	if (Input.GetAxisRaw("Vertical")==-1){
 	if (Input.GetButton("Jump") == true){
 		if(acceleration > 0){
 		acceleration = acceleration - 1;
 		if(acceleration < 0){
 		acceleration = acceleration + 1;
 	//Tank rotation
if (Input.GetAxisRaw("Horizontal")==1){
if (Input.GetAxisRaw("Horizontal")==-1){

Is there a simple way to make gravity affect the tank?

My second question is about the tank going trough everything, it has character controller attached to it, but it doesn’t collide with anything. The hitbox seems to be capsule.

First Question:

I should try: tank.rigidbody.useGravity to true by coding:

tank.rigidbody.useGravity = true;

Of course you can also set it to false if u want.
You also have to have a rigidbody to the tank attached.

Second Question:

You should take a look at the other gameobjects your tank is driving through. Look if they got a collider without the is-trigger-box ticked on.
Good luck:)