ex boyfriend

So me & my ex have been broken up for about a month in a half because he's going to the military on August & we don't want to make this as more difficult as it already is. But today we were together & we had sex but idk if I should feel guilty because we're not together but we still act how we use to I know I'm gonna miss him every much when he leaves to military school.