Actually, oddly enough, underpants are an often overlooked cause of walking funny. Make sure you get a pair that are loose enough without being too loose. Pants rarely cause walking issues, which it sounds like you are having. Socks do fairly frequently but sock problems are really easy to identify and correct.