Shaky movement when translating!

My cube now moves happily along. But he shakes violently from First person view and the Scene view? He is moving along a flat cube? Can somebody explain maybe?

#pragma strict
var defmovespeed : float = 2;
var player;
function Start (){
}

function Update (){
	var player = GameObject.Find("Local_Player");
	if (Input.GetButton("W")){
		player.transform.Translate(Vector3.forward*Time.deltaTime*defmovespeed);
	}
	if (Input.GetButton("S")){
		player.transform.Translate(Vector3.back*Time.deltaTime*defmovespeed);
	}
	if (Input.GetButton("A")){
		player.transform.Translate(Vector3.left*Time.deltaTime*defmovespeed);
	}
	if (Input.GetButton("D")){
		player.transform.Translate(Vector3.right*Time.deltaTime*defmovespeed);
	}
}

Okay now the camera movement script. It move CubesX and Cameras Y. There is two instances running. One for the Cube and One for the Camera.
public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 };
public var axes = RotationAxes.MouseXAndY;
public var sensitivityX : float = 15F;
public var sensitivityY : float = 15F;

    public var minimumX : float = -360F;
    public var maximumX : float = 360F;
     
    public var minimumY : float = -60F;
    public var maximumY : float = 60F;
    public var objecttocontrol = "Hey";
     
    var rotationY : float = 0F;
     
    function Update ()
    {
    var stufftocontrol = GameObject.Find(objecttocontrol);
    if (axes == RotationAxes.MouseXAndY)
    {
    var rotationX : float = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;
     
    rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
    rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
     
    stufftocontrol.transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
    }
    else if (axes == RotationAxes.MouseX)
    {
    stufftocontrol.transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0);
    }
    else
    {
    rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
    rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
     
    stufftocontrol.transform.Find("Camera").localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);
    }
    }
     
    function Start ()
    {
    // Make the rigid body not change rotation
    if (rigidbody)
    rigidbody.freezeRotation = true;
    }

Translate() and rigidbodies don’t go well together, and I assume the first script is on a game object with a rigidbody component. The physics simulation is fighting your translation and that causes the shaking.

Controlling rigidbodies is a bit tricky. Forces are the ideal way to control rigidbodies, but so far I’m finding that you can safely alter the rigidbody.velocity as well. Take that with a pinch of salt though, it may have situations I’m unaware at the moment that could present problems when altering rb’s velocity directly.