What did Buddha taught about space time? It echoes in my mind that space time is not fundamental. I thought I read this in some psychics experiments, saw it in YouTube videos and/or read it in a book related to Buddhism. But I far from recall the details. I searched for space time not being fundamental on the topic of Buddhism but I am not really finding much about it.

With space time not being fundamental I mean to say that it is a construct of the mind. One can understand it is a mental construct, but still experience space time.

I am asking about the Buddhist view on space time, and the implications of that view.

I am asking because of the following experience I had. Recently I experienced some different perception during meditation. It was like my perception of the room I was sitting in vanished and there was no perception anymore of me having a body, sitting in a room. But I would not say I changed, I was still present. And I had my eyes closed all along. This experience of no longer having a body happened to me a couple of times during meditation now.

More recent I was doing a mental exercise to get the difference more clear about experience coming from sensory perception, and experience coming from the mind. I did so by focusing on my body, and then on some memory of how something felt tactically, and then switch focus back on my body, and so forth. I was switching like this continuously. Every time that I switched I mentally called out the difference (using my inner voice, so not out loud): 


  Experience from sensory perception


and


  Experience from mental perception


At some point the distinction became more clear. At that moment it was clear to me the experience of space time arises because of a mental process.
At that moment I could solely focus on sensory perception, and the awareness of space time was gone. And I could go back as well to experience space time again. I then experienced having a body again, sitting in the car, on a parking lot in front of the office.
And I could go back again, focusing solely on sensory perception, where there was no experience anymore of me having a body.
It was like space contracted to be dimensionless and I had no awareness of my body anymore, nor the car I was sitting in. Or maybe I should say that there was nothing more but the experience of the body. The bodily awareness was different. All encompassing vs being part of something else. I am having difficulties to describe my experience. I could still think of my body and the car though, but the experience of having a body and sitting in a car stayed away. It stayed away for as long as I kept this focus on sensory perception. It was like I was withholding my mind from creating the spatial awareness or something.

I'm so curious to explore this more. Also how it relates to the self-awareness and experience of space time in dreaming (so a lucid dream).
And I am really curious if there is some perspective from Buddhism on this kind of experience.
In terms of meditation experiences involving space and time, it may be useful to read up on suttas that describe such experiences. For example in AN8.66 Liberations, we have:


  Going totally beyond perceptions of form, with the ending of perceptions of impingement, not focusing on perceptions of diversity, aware that ‘space is infinite’, they enter and remain in the dimension of infinite space


However, these designations are subjective, so one has to be very careful assuming anything about one's own experiences without consultation with teachers.

For example, your experience might also be a pre-cursor to first jhana in its seclusion from bodily sensation:


  It’s when a mendicant, quite secluded from sensual pleasures, secluded from unskillful qualities, enters and remains in the first absorption, which has the rapture and bliss born of seclusion, while placing the mind and keeping it connected.


The Early Buddhist Texts (EBTs) have many suttas that describe such meditative experiences. Study as many as you can to develop a feeling for the landscape of meditation. Don't get too caught up about attainment, however, since that would trap you in Identity View.

To understand this caution about identity view, it is useful to read MN44:


  “Ma’am, they speak of this thing called ‘the cessation of identity’. What is the cessation of identity that the Buddha spoke of?”
  
  “It’s the fading away and cessation of that very same craving with nothing left over; giving it away, letting it go, releasing it, and not adhering to it. The Buddha said that this is the cessation of identity.”


MN44 also has critical advice on the cessation of perception (ant that includes time and space) per your question:


  “But ma’am, how does someone attain the cessation of perception and feeling?”
  
  “A mendicant who is entering such an attainment does not think: ‘I will enter the cessation of perception and feeling’ or ‘I am entering the cessation of perception and feeling’ or ‘I have entered the cessation of perception and feeling.’ Rather, their mind has been previously developed so as to lead to such a state.”


Note that since you feel that your body has disappeared, you are still perceiving and therefore not in the cessation of perception and feeling. There are many subtleties here. Read much and be very cautious about conclusions and easy answers.