(Third person view) How do i stop the camera through the wall? [Poppercam module]

Hi, I’m making a third-person game.

Shameful, but as you can see below, the character’s camera offset changed a little bit from 0 to -1.8 to the right.

[ approximately 92 line of the Poppercam module ]

function Poppercam:Update(renderDt, desiredCameraCFrame, desiredCameraFocus, cameraController)
	local rotatedFocus = CFrame.new(desiredCameraFocus.p, desiredCameraCFrame.p)*CFrame.new(
	    - 1.8, 0, 0,  -- << I changed this line 'X direction ?' to -1.8
		-1, 0, 0,
		0, 1, 0,
		0, 0, -1
	)
	local extrapolation = self.focusExtrapolator:Step(renderDt, rotatedFocus)
	local zoom = ZoomController.Update(renderDt, rotatedFocus, extrapolation)
	return rotatedFocus * CFrame.new(0 , 0, zoom), desiredCameraFocus  -- JS
end

As you can see in the video below, the problem is that the right side of the screen does not through the wall when the character is a little away from the wall, but when it is fully attached to the wall, the camera through the wall.

I looked for a topic that had similar problems with me.

So I thought I could solve the problem in "PlayerModule/CameraModule/ZoomController/Popper" and I tried to change many times, but I couldn’t.

what line do I have to change to Popper or am I wrong?

Try playing with CFrame.new(0 , 0, zoom) , place zoom in first or second argument.

Thank you for your reply!
I’ve tried it before, but it’s much better.
But is there any way to stop the penetration of the wall?

rotatedFocus * CFrame.new(1.8 , 0, zoom), desiredCameraFocus

I have no idea, maybe to use part, so if parts come one in other, lighter one would get pushed away.
Im sorry for late response…

try inserting a wall in the wall
so the camera will go through the first wall but will collide whit the second one