My FPS Character’s Weapon Clips Through The Camera In UE5. How Can I Prevent That?

As some of you might know, I am working on an investigation-themed horror game set in the 80s. Recently, I was working on an ADS functionality, and when I was done with the coding aspect, I realized that the arms of my character were clipping through the camera.

In such cases, there are multiple ways to fix it. One thing we can do is, we can push the camera further away from the character, but this would alter the default perspective value that we set for your project. Another problem in my case was that my character was parented to the camera, so this method would also move my character with the camera. Then I thought that I could overwrite the default values of camera clipping, and in this tutorial, I’ll show you how to do that.

Note: If you are tired of watching video tutorials and would like to see more text-based tutorials like this one from me, you can support me on Patreon so I can dedicate more time to creating them.

What is clipping? (Optional Read)

Clipping is a crucial step in computer graphics where geometry outside the view frustum is removed before rendering. This optimization improves performance by reducing the rendering workload. Adjusting clipping planes, like near and far values, helps ensure only relevant geometry is processed, enhancing rendering efficiency. While clipping isn’t a rendering technique itself, it’s vital for optimizing performance in rendering pipelines.

How to overwrite the near clipping value in Unreal Engine 5?

Go to your Project settings.

Lazy Loaded Image

Search for the term ‘Clip’. The default value here is set to 10 by Epic. Reduce it to a lower value until your object no longer through the camera.

Lazy Loaded Image

What to pay attention to: This value takes effect after the engine is restarted. In other words, it won’t work immediately if you do not relaunch Unreal Engine.