From the start, we were sure that the camera could be a problem so we look for some information online. After some reserach, we found an article on Gamasutra that explained how to handle camera collisions.
Using the code and ideas of the article as base, I programmed on C++ the collision system. It consisted on throwing 4 raycast from the near plane vertexes, using the front vector of the camera as direction, and moving the camera to the resulting maximun distance.