How to fix camera in tunnel like structure?

I am trying Side Scroller Game. I have tunnel like structure. One floor, two side walls.

I’m changing camera location from behind the character when he enters in the tunnel and set default location when he comes out the tunnel. No problem until here.

But when character enters in the tunnel, camera goes outside the tunnel, behind the wall. And I can’t see my character until he comes outside the tunnel. How can I force camera to follow my character?

Edit: After Hit & Trial I figured it out. But I want to to start showing Camera from back before entering the tunnel. So I placed “Box Collision” just few steps back from tunnel. But camera location mismatch before the tunnel and in the tunnel. :frowning: Any Idea?


What version are you use, you forgot to choose?

Can you post some script of Changing the camera Views, so we may able to see, hard to work it out from description.

I’m using 4.7.6.
Here is screenshot: