Where do Character sweeps happen in code?

I would like to know where to find the sweep logic done for the character’s root capsule component in the engine code. USceneComponent::MoveComponentImpl() takes in a param bSweep and does not appear to use it. I’m using 4.27.2 engine version.

Hi, so it requires going through the whole chain.
USceneComponent has function MoveComponentImpl, but it’s virtual, so can be overridden by child classes.

So when you are asking for UCapsuleComponent you need to check all parents if they don’t override this logic.

So going from children to parent: UCapsuleComponentUShapeComponentUPrimitiveComponentUSceneComponent

You can find that in UPrimitiveComponent there is new overriding for MoveComponentImpl and it actually uses bSweep :slight_smile:

1 Like

Ah yes! Thank you kind sir!