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;
}
}