Can I store a "collision map"/"space_state" and have collisions based on that destinct state of the world?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By KnightNine

I can remove a wall but still be able to have a ray collide with a previous “space state” of when the wall was originally there? This doesn’t seem to work for storage of the map’s current state and seems to just be a reference to the world’s state and not it’s own separate instance:

var phys_dir_space = _world.get_world().direct_space_state

if _original_direct_space_state == null:
    _original_direct_space_state = phys_dir_space