In real life mechs would be quite easy to spot and shoot and hard to armour because of the surface area they have exposed. So to fix that you would make the mech lie prone and give it treads and a rotating turret at which point you have a tank.
The only use I think a mech would have would be to walk around difficult terrain like mountains but those mechs would still be a lot smaller that they are in media and more like an artillery piece with legs.