[UE4] Dynamic Capsule Adjustment

This small system is designed to make a player capsule dynamic in an attempt to make a more accurate capsule to mesh collision. This system utilizes Sphere Trace by Channel to check if a point in the mesh is near a wall or a collision point. Trace is done in a socket / bone to check if if mesh is near a wall.

Bones traced in this test:

  • head
  • spine_03
  • lowerarm_l
  • hand_l
  • lowerarm_r
  • hand_r
  • calf_l
  • calf_r
  • pelvis
  • calf_twist_01_l
  • calf_twist_01_r

Sphere Traces are done on bones illustrate above, these traces are done every frame.

If a trace hit happens, system takes the hit location calculates the distance from capsule world location to the hit location (only x, y coordinates no z) and takes that was the new target radius. The capsule will then finterp to the new Adjusted Capsule.

In action:

Leave a comment