Hi there. It looks like you had an out-of-body experience or an OBE. It was indeed a lucid dream. For me, OBE is simply a lucid dream where, in the dream, you go out of your body. Many times it may seem like it is happening in real life when it's just a dream that is mimicking the last environment before you went to bed.

Congratulations on the lucid! It will get much better the more you try and the more you have them. If you wanna know more about those types of dreams, you can check out the Beyond Dreaming section of the forum, though keep in mind their connection to spiritual things and aspects should be taken very carefully and with discretion since they are debatable: Beyond Dreaming

But anyway, a lucid dream is simply a dream where you realize you are dreaming. Yes you were dreaming, and yes you knew you were dreaming while it was happening, so congrats!

If you need any help with anything else, don't be afraid to post in the forum or send a message. Seeya!