move always on z and x no matter what way chracter is facing?

alright, my character always faces the mouse, so how can I get my movement script to only move on world axis? Instead of moving the way the character is facing.

function Update(){

transform.Translate(fixedDirection.forward * Input.GetAxis(“Vertical”) * Time.deltaTime * speed);
transform.Translate(fixedDirection.right * Input.GetAxis(“Horizontal”) * Time.deltaTime * speed);

}

could have the character as a child of a parent collider? Meaning the parent would have the moveable actions and you could lock the rigidbody roation values? Just a thought :slight_smile: