Have no idea how old you are now, but sexuality in men can be quite abstruse until they are in their 20's - sometimes later. At 12 it is unlikely that it had anything more to do with your sexual preference, perse, but simply an unconscious "physiologic" reaction. BTW, many more males are bi, as opposed to homo. Keep that fact in mind. It (sexuality) is not necessarily a Yes or No thing.
You don't mention your present age, but do not be concerned with any normal bodily reaction. The medical professionals understand that this may occur from time to time.