Camera of third person game doesn't work well

In my third person game, when my character is close to the wall and I look around, sometimes I can see through the wall or the camera seems to be inside the character. I have turned on"Do collision test" by the way. This issue won’t happen in any completed games, and I want to know how I can avoid it.

Thanks,

David

have you tried the SpringArmComponent?

Sometimes you See trough the Wall? I guess that means if your Camera is very near the wall almost aligned to it you can See trough it on the edge of your Screen? If so that is the near clipping plane of the Camera. You can reduce it under Project Settings → Engine → General Settings → Near Clipping plane (set its as low as needed not lower)

Do Collision Test only works if the Collision of the Obstacle between Camera and Player has the Camera Channel set to Block. Thats why you could let your Camera fly Behind a Wall.

Camera gets inside the Character is because your Character Stands very close to a Obstacle now your Camera has only two Options left. Get inside the Wall or get inside the Character. But you have a little Control over that. On your Camera Boom where you Set the “Do Collision Test” there is another Options called Probe Size. You can imagine it as a Sphere around your Camera that is used for Collision testing. If you set it higher it will have a bigger offset of the Obstacle and push more towards your Character. If you set it lower it will be much closer to the Obstacle and we are back to Problem Nr1 the Near Clipping Plane where your Camera can get so close to a wall that you can See trough.

As you See its a trade off one or the other you cant avoid the Character and the Wall at the same time without adding some more Logic via Blueprint. Like for example if your Camara Boom Arm length is less than 100 start rotating it in a direction so it does not stay between the Wall and the Character. But thats something you have to decide what your Camera should do in this situation. UE4 provides you the Basic things you need.

Good luck with Balancing your Camera options =)