Custom movement pass through walls

Hi

I implemented a simple movement script, but the player walks through walls.

On the player I have:

void Update () {
		if (Input.GetKey(KeyCode.LeftArrow))
		{ 	
			this.transform.Translate ( -1 * Time.deltaTime * speed ,0 ,0 ,Space.World ) ;
...

The player and the walls have Rigidbodyes, and there is also a ball that bounce between player and walls, which leads me to believe that the physics are set up OK, an that the problem is in my movement script.

Try using your player’s rigidbody to apply movement. Your current method doesn’t take any physics into account.

    public float inputForce = 1f;
    Vector3 _input;
    void Update()
    {
        _input = new Vector3(Input.GetAxis("Horizontal"), 0f, Input.GetAxis("Vertical"));
        rigidbody.AddForce(_input * inputForce, ForceMode.VelocityChange);
    }