OK, first, I want to make a script that depends on the camera that orbit the player(mouseOrbit) and I want that when you press "W" the player rotates in front of the camera and when you press "S" the player rotates backwards of the camera and "a" left and "d" right, so for doing this I have try many things like using Rotate, rotation, Slerp, LookAt, eulerAngles, localRotation ,etc. and no one of this works like I want, this is an idea of what I want:
if(Input.GetKey("w")){
/*go front of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}
if(Input.GetKey("s")){
/*go back of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}
if(Input.GetKey("a")){
/*go left of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}
if(Input.GetKey("d")){
/*go right of the camera*/
transform.Translate(transform.forward * Time.deltaTime * speed, Space.World);
}
Note: I want a way that if you press like "w" and "d" it doesnt go front or right it does between the 2 directions