I have an easy solution for this with no extra actions needed.
Step 1. Create a box collider right under your camera.
Step 2. Add an FSM to the box collider, set it to trigger when it collides with the terrain
Step 3. Create a variable for your mouse Y Sens and when the box triggers have it set your mouse Y sens to 0
Step 3. Get your mouse Y axis input, compare the float, if its greater send to to another event that sets your sens back to normal.
If your terrain isnt flat, use a raycast to detect the position of the terrain and set your cameras y position to that and it will follow the terrain level
you wont get any bouncing camera effects with this method