Character controller ( HELP )

Sorry to ask, anyone know character controller script that would follow hmd movement direction? Right now my controller is

intially;

move forward = up
move backward = down
move left = left
move right = rigt

but when i turn backward

move forward = down
move backward = up
move left = right
move right = left

my character controller script

using UnityEngine;
using System.Collections;

public class characterController : MonoBehaviour {

public float speed = 10.0f;

void Start ()
{
Cursor.lockState = CursorLockMode.Locked;

}

void Update()
{

float translation = Input.GetAxis(“Vertical”) * speed;
float straffe = Input.GetAxis(“Horizontal”) * speed;
translation *= Time.deltaTime;
straffe *= Time.deltaTime;

transform.Translate(straffe, 0, translation);

if (Input.GetKeyDown(“escape”))
Cursor.lockState = CursorLockMode.None;
}

}

I had this problem too. What you need to do before transform (I used moveposition but anyway) I translated the Vector3 coordinates to LOCAL coordinates and it worked fine, you should even normalize too so you don’t run faster if walking front and right at the same time