You do not have to hit him. Just jerk the lead-rope hard two or three times if he tries to go past you or bumps into you. Jerk him hard, face him and make him back up 3 or 4 steps.
One thing that helps a lot (and something I teach every child or novice adult I work with) is to turn every horse to the right every time you turn it or head a different direction. I do not ever let a horse walk past me or around me. I am always in the position to 'push' a horse ahead of me to the right. This reinforces every single time a horse is handled that the handler is in charge and not the horse.
You do not have to hit or be mean to a horse. You just have to let him know every single day that you are the leader and he is the subordinate. When you step him and push him toward the right, it should be on a light/loose lead line. A bump or small jerk is far more effective than a steady push. You can never out-push a horse, but a small jerk or two will encourage a horse to step away from you and let you be the leader.
It is an everyday work that is always in progress.
Please, please do not chase a horse around to make him mind. All he will just learn is to barge forward. You will be much better served by teaching him to slow down and back off.