How to stop weapon clipping (Fps)

How can I stop weapons and arms clipping through (going through) walls like how it is in BF4, cod, halo, etc

You make the collision mesh bigger than the object in question.

Thats not going to look right when the player collides with an invisible wall 2 ft away from the wall, I need someway to get the guns and arms to be rendered first I think.

Well your going to have to give a bit more information as to your game movement dynamics. In most cases that is how its done just to keep the player out of the wall and after that it’s about context of why the player would need to get closer.

In the case that you want to climb a wall or **** up against it then that’s probably a procedural event using some type of volumetric trigger and a context based animation set is used instead of the player control version.

Or

They are using a HIK middleware solution

Second though a few questions.

Are you talking about the first or third person and are you using the template or custom model?

Last I heard the ability to render on a different depth layer was not in yet, which UE3 does has. That might be a help once it is in (I believe planned feature). That way you render in the foreground thus it can never intersect with level geometry.

Dang, I was looking for that :frowning: Oh well, guess we’ll have to wait.

As FrankieV mentioned, IK’s would be a good solution to avoid weapon clipping. Something like in the Animations Demo (the one where the character punches a wall that’s sliding up and down, blocking the fists) ?

Same rule would apply, but instead of fists being blocked, that would be the weapon going up when close to a wall.