Can obesity hinder getting an erection?

Yes. Obesity change the level of testosterone as it get converted to female sexual hormone. Testosterone is necessary for libido and erection.
No. Sexual arousal is complex & may be affected by obesity in many ways. Psychological issues include one's self image and one's attraction to the other person, which means one can have trouble with arousal if either he or his partner is obese. Medical issues include decreased sensation from diabetic nerve damage, poor circulation from artery disease, lower testosterone due to hormonal changes, etc...