Camera issues

I have a true first person camera parented with my head but when I run towards a wall or a box or whatever my camera goes through it for less than a second. All this objects (wall,floor,box,spheres) have collisions set on blockall.

Any idea of to avoid the camera clipping into these objects?

Hi ,

The best way to handle this is to slightly increase the radius of the capsule component. That way the capsule connect with the wall/object before the camera.

Let me know if that works with your setup.



Wow I tried this yesterday but I probably forgot to put the camera front inside the capsule so thank you very much

One last thing I noticed that this works for walls and objects but when I fall to the ground (simulating physics) sometimes the camera still clip through it, I know why this happens but I think there’s no way to fix it without moving the camera right?

Yeah, the camera itself doesn’t have any sort of collision you can enable. Most games handle this by moving the camera into the 3rd person when the player dies. This is usually because ragdolls can be a little unpredictable.

yes but some games manage to make first person ragdoll experience like GTA 5
Is there any chance I can realize something like this with unreal engine 4?

Yeah, especially if you were to dip into code, I’m sure there is several different ways to achieve this. However, here is one possible solution without changing/adding code.

Make a second Physics Asset that has a larger Physics Body for the head. You only want to use this while your character is rag-dolled because the physics bodies also act as hit boxes.

  • When your character is killed/knocked down > swap the standard physics asset for the one with the larger head > then simulate physics on the mesh.

This should keep the camera from clipping through objects.

  • When you are ready to stop simulation (stand up) > disable physics simulation > swap the physics asset back to the original.

Let me know if that works for you.

thanks now works quite well and this also fixed the problem I had with the teleporting ragdoll.