I have the same problem. No matter what the situation is I also will get hard if I have to get undressed in front of someone. I have always wondered if anyone else did too. My problem is that I worry about getting hard, which always ends up getting me hard. In another post I mentioned how I had to just say something to a friend of mine who kept inviting me over to get in the hot tub. I turned away and covered up as long as I could while getting undressed, but got annoyed at acting so modestly and said "hey, I have this problem, it's nothing sexual and will likely go away after a time or two." It finally did.
I am amazed at guys who can not only get undresesed, but who can then walk around completely naked and soft. No way could I ever do it. I can handle the gym locker room because it is old hat, but the first few times I got changed after joining the gym were a real trial. I like surferboy's attitude, but I don't think most guys are as easy going about another guy walking around in front of them with a boner. Yeah they happen, but are you really comfortable standing around at full mast for, what most guys would see as, no apparent reason. I would guess that erections are perceived mostly as a sign of sexual arousal. For some of us though, they just happen and for completely non-sexual reasons.
Altairion, just curious if you "warn" people what is happening and why when you find yourself in a situation or do you just let it go? I've debated what the best thing to do is and I know I would be surprised if a guy dropped trou in front of me for some non-sexual reason and was hard.