I was taught several different things -

Alternate going right and left around obstacles. This tends to lessen drift.

First man is point/paceman, second man has compass and directs first guy. Allows the first guy to keep his head up and not get 'tunnel vision'. He can sight on a terrain feature and go for that. If alone, always use the terrain feature method. If in a group, use that method, but have an alternate paceman and compass man towards the rear of the group/

Assume your dominant leg is the same as your dominant hand. Every 100m take a step to the dominant side. Lessens drift to some extent.