How to cast a ray ignoring backfaces

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

My game is 3D. There are two parts, making levels and playing levels. In the level editor, you can select walls and push/pull them, which is done via ray casting. The problem is that the camera will usually be outside of the level, looking in, so the walls will disappear because of backface culling, but the rays actually hit the invisible walls. Is there any way to ignore those backfaces and only hit the walls on the other side, which are visible?