RigidBodys and Scripts equals Error.

Imagine:A cube with a Rigidbody, the Player.

Problem: When cube turns completely backward, S (backwards button) is forward and W, vice versa. `

#pragma strict

var moveSpeed : float;
var turnSpeed : float;

function Update(){
	if(Input.GetButton("TurnLeft")) {
		transform.Rotate(-transform.up * turnSpeed * Time.deltaTime);
	if(Input.GetButton("Jump")) {
		transform.Translate(transform.up * 5 * Time.deltaTime);
	if(Input.GetButton("Forward")) {
		transform.Translate(transform.forward * moveSpeed * Time.deltaTime);
	if(Input.GetButton("Backward")) {
		transform.Translate(-transform.forward * moveSpeed * Time.deltaTime);
	if(Input.GetButton("TurnRight")) {
		transform.Rotate(transform.up * turnSpeed * Time.deltaTime);


The problem is probably your camera. Is it a child of the cube ? A little advice, use another object (cube, cylynder or whatever) to make a nose for your charater, or anything that shows what is the front. It will prevent from being confused.

Well, I found out the problem. Im moving on a world axis, not local. I don’t know how to switch it to local.
If there is no replies, im reposting this.