Enemy won't collide with walls using transform.Translate

I have an enemy that rushes towards the player inside a small room (game is 2d). The enemy is a cube and has a child cube that acts as it’s collider for me. When the enemy runs past or through the player and goes towards a wall it just clips through the wall but when the enemy stops in the room and the player moves towards him the collider works and the player can’t clip through it.

I was wondering if there was an alternate to transform.Translate that would work in my position.

if(Move)
{
	transform.Translate(Vector3.forward * speed * Time.deltaTime); 
}

Hello,

As it was mentioned in the documentation about Translate, objects that are Translating are immune to physics. Translating is just the same method as draging object through the scene. Try using rigidbody/charactercontroller component instead of Translating it.

Regards,
M.Rogalski