# Where do Character sweeps happen in code?

**URL:** <https://forums.unrealengine.com/t/where-do-character-sweeps-happen-in-code/2299867>\
**Category:** C++\
**Tags:** sweep, scene-component, unreal-engine, Collision, CPP, question\
**Created:** [January 23, 2025, 7:56pm UTC](https://forums.unrealengine.com/t/where-do-character-sweeps-happen-in-code/2299867 "2025-01-23T19:56:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuck3201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chuck3201](https://forums.unrealengine.com/u/chuck3201)\
**Post date:** [January 23, 2025, 7:56pm UTC](https://forums.unrealengine.com/t/where-do-character-sweeps-happen-in-code/2299867/1 "2025-01-23T19:56:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sitiana](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sitiana/32/1194605_2.png) [@Sitiana](https://forums.unrealengine.com/u/Sitiana)\
**Post date:** [January 23, 2025, 8:29pm UTC](https://forums.unrealengine.com/t/where-do-character-sweeps-happen-in-code/2299867/2 "2025-01-23T20:29:53Z")

</div>

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: `UCapsuleComponent` → `UShapeComponent` → `UPrimitiveComponent` → `USceneComponent`

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/a/a7a1224b902ead81df94ecbd7cc89b5ab4b32aea.png)

---

<div class="post-metadata">

**Author:** ![chuck3201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chuck3201](https://forums.unrealengine.com/u/chuck3201)\
**Post date:** [January 23, 2025, 9:10pm UTC](https://forums.unrealengine.com/t/where-do-character-sweeps-happen-in-code/2299867/3 "2025-01-23T21:10:48Z")

</div>

Ah yes! Thank you kind sir!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 22, 2025, 9:10pm UTC](https://forums.unrealengine.com/t/where-do-character-sweeps-happen-in-code/2299867/4 "2025-02-22T21:10:55Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
