Download

Big problem with weapons clipping environment in first-person game

I’m making a fast-paced first-person game with focus on melee weapons. The standard issue with weapons clipping through walls turned out to be more serious than I thought. Solutions I know:

  1. Tiny weapons. Won’t work for me for obvious reasons: melee impact world directly and can penetrate things (eg swords)
  2. Shaders magic. Manipulations with depth, panini projection, etc. Plus provides separate FOV for weapons and actual view. I would use it otherwise, but I can’t for the same reason as above
  3. Actually moving the weapon away from walls. It seems like the most suitable solution technically, but it doesn’t fit the game itself. Again, it’s fast-paced and hiding the weapon near every wall looks tidious (just imagine DOOM but every time you’re near a wall Doomguy hides his shotgun)

Are there other solutions for this problem?

Maybe you could use a sweep/trace to detect if the weapon is hitting a wall and find where it should go, and then use inverse kinematics in your animation blueprint to make the weapon be adjust/rotated to not hit the wall.

1 Like