I need to make a custom first person controller for the game i’m making and the controller doesn’t move
with the rotation, so when I hold W in some positions it moves left or right.`
void Start () {
}
void Update () {
x += sens * Input.GetAxis ("Mouse X");
y -= sens * Input.GetAxis ("Mouse Y");
transform.eulerAngles = new Vector3 (y, x, 0);
moveto = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
moveto = transform.TransformDirection (moveto);
moveto *= movespeed;
cc.Move (moveto * Time.deltaTime);
}`