Hovering controllers/ mouse pointing.

Hey all!

My achillies heel is scripting.
thats why i need your help.

I have this script. it makes me use the WASD keys to move my tank around.
using UnityEngine;
using System.Collections;

public class HoverMotor : MonoBehaviour {

public float speed = 90f;
public float turnSpeed = 5f;
public float hoverForce = 65f;
public float hoverHeight = 3.5f;
private float powerInput;
private float turnInput;
private Rigidbody PlayerRigidbody;

void Awake ()
{
PlayerRigidbody = GetComponent ();
}

void Update ()
{
powerInput = Input.GetAxis (“Vertical”);
turnInput = Input.GetAxis (“Horizontal”);
}

void FixedUpdate()
{
Ray ray = new Ray (transform.position, -transform.up);
RaycastHit hit;

if (Physics.Raycast(ray, out hit, hoverHeight))
{
float proportionalHeight = (hoverHeight - hit.distance) / hoverHeight;
Vector3 appliedHoverForce = Vector3.up * proportionalHeight * hoverForce;
PlayerRigidbody.AddForce(appliedHoverForce, ForceMode.Acceleration);
}

PlayerRigidbody.AddRelativeForce(0f, 0f, powerInput * speed);
PlayerRigidbody.AddRelativeTorque(0f, turnInput * turnSpeed, 0f);

}
}

what i want it to do is to follow my mouse pointer for direction. and be able to use my A and D key to strafe left and right. Not turn left and right as im doing now.
how shall i do it?
the Tank has a fixed cannon on it, so it will shoot the direction the tank body is faced.

Start here:

If you want the tank to move instead of rotate, you should add force and not torque.

I found MovePosition, MoveRotation was better suited to tank control

Forgot to say that its a hover tank.
It can hover at any direction. Doesnt need to turn.
It can strafe side to side.

using UnityEngine;
using System.Collections;

public class HoverMotor : MonoBehaviour {

public float speed = 90f;
public float turnSpeed = 5f;
public float hoverForce = 65f;
public float hoverHeight = 3.5f;
private float powerInput;
private float turnInput;
private Rigidbody PlayerRigidbody;


void Awake ()
{
PlayerRigidbody = GetComponent <Rigidbody>();
}

void Update ()
{
powerInput = Input.GetAxis ("Vertical");
turnInput = Input.GetAxis ("Horizontal");
}

void FixedUpdate()
{
Ray ray = new Ray (transform.position, -transform.up);
RaycastHit hit;

if (Physics.Raycast(ray, out hit, hoverHeight))
{
float proportionalHeight = (hoverHeight - hit.distance) / hoverHeight;
Vector3 appliedHoverForce = Vector3.up * proportionalHeight * hoverForce;
PlayerRigidbody.AddForce(appliedHoverForce, ForceMode.Acceleration);
}

PlayerRigidbody.AddRelativeForce(0f, 0f, powerInput * speed);
PlayerRigidbody.AddRelativeTorque(0f, turnInput * turnSpeed, 0f);

}
}