How do i get the character to stop shaking?

Hello, I would like to have the game character stop shaking when it hits a box collider. the Character has a box collider and so does the wall, it collides but when it does it shacks my character, Why? can this be fixed without using acceleration and just transform .translate thanks. the Character has a ridged body. here is the code i am using

#pragma strict

var tilt : Vector3 = Vector3.zero;
var speed : float;

function Update () {
	tilt.y = Input.acceleration.y;
	tilt.x = Input.acceleration.x;
	
	transform.Translate(tilt * speed * Time.deltaTime);
}

Your movement isn’t performed with Physics function AND not at the same time as the Physic loop (FixedUpdate). Unless your rigidbody is Kinematic, you should use AddForce.

transform.Translate is moving the position of object without concerning physics. Therefore, if you have used translate, it moves to the amount of position whether there is something to collide or not. Then, it checks physics and updates positions again. So, what you are seeing, shaking is right action. If you want to remove this shaking, like mantoue said try to put your code in function LateUpdate(){} or if you prefer to use it in update. Try using ray to check pre-collision and hold the movement