# How do you build a custom movement solution that does not break other parts of Unreal?

**URL:** <https://forums.unrealengine.com/t/how-do-you-build-a-custom-movement-solution-that-does-not-break-other-parts-of-unreal/2626809>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, CPP, question\
**Created:** [August 1, 2025, 8:25pm UTC](https://forums.unrealengine.com/t/how-do-you-build-a-custom-movement-solution-that-does-not-break-other-parts-of-unreal/2626809 "2025-08-01T20:25:47Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [August 2, 2025, 5:51pm UTC](https://forums.unrealengine.com/t/how-do-you-build-a-custom-movement-solution-that-does-not-break-other-parts-of-unreal/2626809/8 "2025-08-02T17:51:51Z")

</div>

Sorry. I wasn’t trying to upset you. Here’s a thread that has a solution for individually checking components for sweeping. If that BP isn’t performant enough, there’s a separate branch. I don’t know how recent it is, but if you know git, you could probably merge it over.

> [@Sweep only works with Root component?](https://forums.unrealengine.com/t/sweep-only-works-with-root-component/319976/13):
>
> I had this problem, found this thread and decided to write a function that solves it It calculates offset between current and desired root transform, sweeps all children by that amount, finds shortest sweep time, puts children back where they were and moves root by original offset multiplied by smallest sweep time May be useful for other who had this problem, feel free to optimize it

I believe this is your issue, not the root component. Not the gaps, not the alignment. These are things you seem to have convinced yourself are causing you problems and can’t let go for some reason. I’ve been there. But tight fit of root collisions is almost never a good idea. It’s just there for two reasons. Quick collisions and collisions with the floor to get you an approximation so your characters can walk on the ground. That’s it. And yes, everyone has meshes that aren’t centered with their root collision.

Here’s an example from my game.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/4/034b99156b0cceaf3cd9805ba1b48d1eb87e13dc.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/0/e5044344b6f8b91b4dea2947a1eb4fa5a9caaa57.jpeg)

This is a bipedal robot with full walk animation. The capsule is not centered on the mesh. It doesn’t need to be. It’s just to get an approximate position on the ground. But on inclines, this is of no use. So my animation script looks at where the ground actually is and does multi bone IK to move the leg down and even rotates the foot to rotate to align with the slope of the ground. Since enemies can pass between his legs since he is so big, I made custom collisions for his legs. Those are the two boxes. They are not visible during gameplay.

If sweeping is actually something you need, then work on that first. Don’t bother with the size or alignment of the root collision. Just make it big enough. And you’ll likely find that all the other problems you thought you had just disappear.

Hope you find something that will help you move forward. Good luck!

---

_[View the full topic](https://forums.unrealengine.com/t/how-do-you-build-a-custom-movement-solution-that-does-not-break-other-parts-of-unreal/2626809)._
