Currently I am using the script
Angle = GameObject.Find (“Player”).transform.eulerAngles.y;
input = new Vector3 (Mathf.Cos (Angle) * 1, 0, Mathf.Sin (Angle) * 1);
GetComponent<Rigidbody>().AddForce (input * moveSpeed);
To set up movement so the W key always moves in the direction the object is facing, I have other scripts that set angle
if (Input.GetKey (KeyCode.D))
transform.Rotate (Vector3.up, turnspeed * Time.deltaTime);
if (Input.GetKey (KeyCode.A))
transform.Rotate (Vector3.up, -turnspeed * Time.deltaTime);
I am using Cos and Sin to figure out how much it needs to move in the X and how much it needs to move in the Z. It is no at all functional so I am wondering if there is a simpler way to do this.