How can I prevent this from happening?
First, it doesn’t look like the character is clipping into anything in that screen shot.
Second: you can increase the radius of the character capsule, so it can’t get close enough to the wall or other objects to clip. Exactly how much you need to grow it, depends on the specific animations you’re rendering.
Note that the Character pawn kind is specifically hard-coded to use a capsule, to make FPS-style movement fast and robust. If you need another kind of movement, for example where each leg/limb may collide separately, then you’ll want to develop another subclass of Pawn for that behavior, and add the appropriate collision volumes (or use the skeleton physics asset) for that.
Look at the arms.
Right – you need to make the capsule radius bigger.
There is no simple and universal solution. You can do world tracing and play another animation (or use IK) for hands. Good approach, but requires manual control. Or, try PhysicalAnimation component. Universal, but causes physical artifacts sometimes.
This would cause other much bigger issues.
How would I make something like this:
I know it has to do with IK and somebody said the person that made this used this tutorial:
Short of increasing the capsule size or using IK, you could also conduct a trace in front of the weapon from a desired point and if there’s a Worldstatic hit result, changing the pose to point the weapon up or down (and within capsule bounds) and disable firing until the weapon is clear of the object.