Stop Clipping of Components

Very simply put: I am adding a component actor to my character. All I want is to stop the actor from clipping into walls while still allowing free character movement. That is it. I cannot seem to figure this out at all and I need some help. The GIF I have linked below basically illustrates exactly what I do not want to happen. Especially because it instantly breaks any and all immersion.

You can use several ways to avoid that:

-use an animation which lifts your object when the player is near a wall
-increase the capsule size of your character
-make the object smaller and move it near the camera so that it still appears in a right size -> then you wont have to change the capsule

https://forums.unrealengine/showthread.php?2006-First-Person-Example-Arms-Clip-Through-World :slight_smile:

1 Like

Thank you for the suggestions! I have some ideas now but still not set on anything. I also want the player to be able to use their object as a tool. So for example, a candle lighting another candle.

So I am hesitant to manipulate the object’s size, and don’t want to enlarge the capsule as the game takes place in an already small environment.

I am considering using some other Blueprints that would make it more of a physically picked up object, rather than trying to fit it into the player space.

I don’t mean to be pushy, but, does anyone else have suggestions?

Well if you want a simple solution just make the collision mesh for the wall thicker.

Another option, if you are OK with blueprints, would be to give your map objects a brain that can talk to your movement component using a on collision overlap trigger. If the overlap is triggered clamp the yaw for that direction. On exit overlap, by turning in the other direction, release the clamp.

Another idea, and I have not tried it, would be to added another camera spring arm and use that as your connection point for pick up items. The spring arm works great for keeping the camera from clipping walls so I see no reason it would not work the same way on map objects as a replacement of a camera.

Thinking about it.

Fighters suggestion of making objects smaller as in decreasing scale relative to the 1st person camera would be the best idea based on camera behavior using what’s called forced perspective.

As you decrease scale but move closer to the camera then the object will maintain relative scale as to objects in the background so this should not be an issue as to using one candle to light another.

Something to consider is how things are rendered relative to the camera is based on the position of the near and far plane so if your object falls inside the near plane of the camera it will always be rendered on top of any object that is in the background and out side the far plane.