Problem with collisions | 2D | Android | C#

Just starting out on developing for Android and quickly bumped into a problem - I have a player in the shape of a space bar that is restricted only to the movement on the X axis and tilting the tablet causes it to move left or right. The problem is that if I tilt the tablet at angles at around 45° while the player is colliding into a wall it can clip through it with ease.

Here is the script for the player controls (in C#):

using UnityEngine;
using System.Collections;

public class AccelScript : MonoBehaviour 
{
	public float SpeedMultiplier;
	
	// Update is called once per frame
	void FixedUpdate () 
	{
		transform.Translate (Input.acceleration.x * Time.deltaTime * SpeedMultiplier, 0, 0);
	}
}

Help will be appreciated!

I’ve managed to figure it out for myself; I changed:

transform.Translate (Input.acceleration.x * Time.deltaTime * SpeedMultiplier, 0, 0);

to

rigidbody2D.velocity = new Vector2(Input.acceleration.x * Time.deltaTime * SpeedMultiplier, 0);

and then set the SpeedMutiplier to a much higher value to alter the sensitivity.