Gun Collision

I designed a FPS game and the enemies “enter” my gun (they don’t collide or wtv). Is that suppose to happen?

Yes, your mesh component doesn’t have collision enabled, it is the capsule component which is doing the colliding. Your gun is poking out of the capsule, and so it can overlap things. You can fix this either by adding some collision to the gun mesh, or by making the capsule wider.

ok thx. =)

Well it now blocks the enemies but it still goes through walls.

Walls are set to overlap all and so is the mesh of the gun so what’s next?

If you want your gun to collide and stop on everything, set it to block all. Overlap means that they won’t stop when they collide, but they will still fire overlap events. Also set your wall to collide with the type of collision object your gun is set to.

Alternatively, and more a more difficult solution is to detect when your gun overlaps with a wall, and play an animation which raises the gun up away from the wall. This is the more realistic and animation-based solution.

Another solution which I achieved in unity but have never tried in UE4 is to have a second camera which only renders the gun and hands, and then layer that camera’s view on top of the original camera, which renders the rest of the scene.