I have the exact same problem. Same scenario even. Long time iphone user, just switched to android. I am VERY happy with the S5 aside from this slight issue.
Mine is a pretty noticeable ticking sound when I move the phone around, and sometimes when I tap. I don't have to flail the phone or tap violently, it happens with light use. If I do shake the phone I can almost feel something moving around in there. It sounds like something is loose.
I panicked at first thinking my new phone was broken, however reading internet forums it sounds like a common issue with phone cameras...which I somehow never noticed before. I still have my iphone, and that makes a very slight ticking sound if I flail it around (much quieter though). The funny thing is I never noticed the ticking on my iphone after using it daily for 2 years, until just now when looking for it haha.