How to set collision on mesh

I’m having an issue with my mesh clipping through objects because the animation puts the character out of the capsule comp. In the Root Motion Documentation it mentions this.
Root Motion and Physics
Since the capsule comes along, this means that physics collisions can still be used and we solve the issue of characters passing through walls, as well as alleviating the problem of the character needing to snap back to the capsule position. In the image below, the animation is using Root Motion, which brings the capsule along, causing the character to collide with the wall, rather than passing through it.

You will note that it is not quite perfect, as the character’s bending animation causes it to pass somewhat through the walls. However, this could be easily managed by either working with collision volumes on either the wall or the character. The important point is that the capsule is keeping up with the motion and preventing the character from passing all the way through the wall and having to snap back.

Any ideas how I could achieve this?

So for animations (root motion or otherwise) that basically don’t fit in the player capsule there are two approaches I have used in the past:

  1. Dynamically change capsule radius in animation blueprint or actor blueprint based on the animation that is playing.
  2. Turn on physics-driven animation so that the bodies in the mesh simulate physics and don’t go through the wall. Note, this can be tricky to configure as it changes how your animations look.