# How to use set world location with sweep to make actors move smoothly across uneven ground?

**URL:** <https://forums.unrealengine.com/t/how-to-use-set-world-location-with-sweep-to-make-actors-move-smoothly-across-uneven-ground/2276137>\
**Category:** C++\
**Tags:** vehicle, vehiclemovementcompo, unreal-engine, Blueprint, CPP\
**Created:** [January 14, 2025, 7:39am UTC](https://forums.unrealengine.com/t/how-to-use-set-world-location-with-sweep-to-make-actors-move-smoothly-across-uneven-ground/2276137 "2025-01-14T07:39:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Supermatta321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Supermatta321](https://forums.unrealengine.com/u/Supermatta321)\
**Post date:** [January 14, 2025, 7:39am UTC](https://forums.unrealengine.com/t/how-to-use-set-world-location-with-sweep-to-make-actors-move-smoothly-across-uneven-ground/2276137/1 "2025-01-14T07:39:09Z")

</div>

Any suggestions for how to use set world location on my vehicle actors and use the sweep collision to make it move smoothly across ground?

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [January 14, 2025, 9:41am UTC](https://forums.unrealengine.com/t/how-to-use-set-world-location-with-sweep-to-make-actors-move-smoothly-across-uneven-ground/2276137/2 "2025-01-14T09:41:55Z")

</div>

can you give us more information? if its a vehicle usually you’d move the chassis and offset the wheels for collision, like a spring

---

<div class="post-metadata">

**Author:** ![Supermatta321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Supermatta321](https://forums.unrealengine.com/u/Supermatta321)\
**Post date:** [January 14, 2025, 12:21pm UTC](https://forums.unrealengine.com/t/how-to-use-set-world-location-with-sweep-to-make-actors-move-smoothly-across-uneven-ground/2276137/3 "2025-01-14T12:21:17Z")

</div>

Different vehicles really, but no, I basicly just want to move a mesh by adding a velocity (vector) to the world location of the object to make it move. I also simulate gravity in this velocity vector, but struggling with moving the object further whenever the sweep of the set world location hits something, as this makes it stop completely.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [January 14, 2025, 1:16pm UTC](https://forums.unrealengine.com/t/how-to-use-set-world-location-with-sweep-to-make-actors-move-smoothly-across-uneven-ground/2276137/4 "2025-01-14T13:16:54Z")

</div>

its tricky, in that case i’d use a flat surface to move along and any ‘rocks’ and such dont effect collision.

if you’re familiar with c++ look at the base unreal engine movement component  
key functions are depenetrate and slidealongsurface

in short you have to handle hits, check if a hit is ‘blocking’ or ‘drivable’

---

<div class="post-metadata">

**Author:** ![Supermatta321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Supermatta321](https://forums.unrealengine.com/u/Supermatta321)\
**Post date:** [January 14, 2025, 1:18pm UTC](https://forums.unrealengine.com/t/how-to-use-set-world-location-with-sweep-to-make-actors-move-smoothly-across-uneven-ground/2276137/5 "2025-01-14T13:18:20Z")

</div>

Thanks!! Yes, im familiar with cpp, and will check it out! Great tip 😃
