My current solution to avoid this kind of behavior is to perform a dot product between the impact normal and the forward direction of the vehicle. If the abs(result) is above a certain value I'll add a impulse force to keep the vehicle away from the wall.
But this solution is only temporary as it breaks when the walls are tilted or when the vehicle attacks the wall from the side.
(I'm using the UE4 and the game is in 3D)
Any ideas for a better solution for this kind of problem?