# Simple move to, getting stuck on corners

**URL:** <https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854>\
**Category:** Blueprint\
**Tags:** stuck, Navigation, unreal-engine, Blueprint, question\
**Created:** [January 13, 2015, 5:53pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854 "2015-01-13T17:53:40Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 13, 2015, 5:53pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/1 "2015-01-13T17:53:40Z")

</div>

My ai gets stuck going around corners sometimes. Making the Agent Radius bigger stopped the ai from just walking into the wall, but now sometimes they just get stuck, like the Agent Radius is inside the wall and they can’t move, just just give up. I’ve tried finding a balance on the size of the Agent Radius but it’s either run into the wall and slowly slide off it or get completely stuck beside it.

Btw, I’m using “Simple Move to Actor”.

Any suggestions? Thanks!

I replied to another question but no reasons there. [AI having problems navigating near corners - AI - Unreal Engine Forums](https://answers.unrealengine.com/questions/60307/ai-having-problems-navigating-near-corners.html)

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [January 13, 2015, 6:54pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/2 "2015-01-13T18:54:25Z")

</div>

Would you mind posting some images with navmesh debug-drawing enabled?

---

<div class="post-metadata">

**Author:** ![Eight\_Bit\_Punk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eight\_Bit\_Punk](https://forums.unrealengine.com/u/Eight_Bit_Punk)\
**Post date:** [January 14, 2015, 12:21am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/3 "2015-01-14T00:21:47Z")

</div>

Maybe have the actual actor detect when it’s not moving?

Like… if it gets stuck, it’s movement velocity will be slowed considerably… so maybe set up a bool for when that happens, and have the thing that’s moving “move to” a location that’s behind it (subtract or add from that location to make a new one), and then resume it’s path?

Just a thought! 🙂

---

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 14, 2015, 3:22am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/4 "2015-01-14T03:22:45Z")

</div>

Not a bad idea, although I’d like to do it without running more checks.

I’ll post images/video asap(probably this weekend).

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [January 14, 2015, 3:09pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/5 "2015-01-14T15:09:03Z")

</div>

Check like that is already being done under the hood of AI pathfollowing. This sounds like navmesh setup issue that’s why I’d like to see some images.

---

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 15, 2015, 4:41am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/6 "2015-01-15T04:41:21Z")

</div>

What’s the command line for navmesh debug-drawing?

---

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 15, 2015, 5:10am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/7 "2015-01-15T05:10:19Z")

</div>

First one is 200, the other is 300 Agent Radius.

 ![26721-2015-01-14+21_08_22-hnh_ue4project+-+unreal+editor.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/e/23ea9b957effc85a0c87d4ba28741406f79258aa.jpeg)

 ![26722-2015-01-14+21_07_26-hnh_ue4project+-+unreal+editor.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/1/ff18bfb2137907727875decc97f8263397aabb59.jpeg)

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [January 15, 2015, 11:26am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/8 "2015-01-15T11:26:16Z")

</div>

It seems your problem is connected to the fact that your characters punch holes in the navmesh. Do you have a real reason for having this feature enabled? I’m asking because this is a bit of a hack, character avoidance should be handled by either RVO or detour crowds. The only good reason to have this enabled is to have paths generated around characters that are not moving, and this can be still achieved with dynamically toggling whether a character affects navmesh (so that it doesn’t update navmesh while moving). If you enable navmesh drawing while your character is moving you’ll see what I’m talking about.

Having said that we have something in the pipeline that will make it work both better and faster. It should be available in version 4.8.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 15, 2015, 5:18pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/9 "2015-01-15T17:18:20Z")

</div>

Sorry, that guy is just a statue, a static mesh. He’s not the character that gets moved around.

The only thing I’ve changed in the navmesh setting is the Agent Radius.

 ![26783-2015-01-15+09_15_43-project+settings.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/1/c71a00e5350de169c80f7bab6363e8eb5b278acd.jpeg)

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [January 15, 2015, 6:19pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/10 "2015-01-15T18:19:40Z")

</div>

What about AI agents, what’s their radius?

---

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 15, 2015, 7:41pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/11 "2015-01-15T19:41:41Z")

</div>

I’m not using AI(I probably should I suppose). Only using default pawns being moved with “Simple Move to Actor”.

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [January 15, 2015, 7:55pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/12 "2015-01-15T19:55:22Z")

</div>

So you _are_ using elements of AI 😃 The agent radius in this case would be what defined by your pawn movement component’s properties.

---

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 15, 2015, 8:51pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/13 "2015-01-15T20:51:26Z")

</div>

I see, those settings are at default. I’ll play with them and see if I get better results. Should they be set the same as the navmesh? What’s standard practice for that?

---

<div class="post-metadata">

**Author:** ![Redsett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Post date:** [January 16, 2015, 5:04am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/14 "2015-01-16T05:04:26Z")

</div>

I’ve seemed to have found a balance of 100 Radius in the navmesh and 150 on the ai. Haven’t been able to get it stuck or sliding on a wall yet. Thanks!

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [January 16, 2015, 9:19am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/15 "2015-01-16T09:19:21Z")

</div>

Ideally Navmesh would be build to agent radius equal or greater to radius of your characters.

---

<div class="post-metadata">

**Author:** ![rjsams](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rjsams](https://forums.unrealengine.com/u/rjsams)\
**Post date:** [August 11, 2016, 11:06pm UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/16 "2016-08-11T23:06:31Z")

</div>

It may be worth checking the settings of the characters EMovementMode.

Switching from the default MOVE\_Walking to MOVE\_NavWalking greatly improveded the movement for us.

auto cm = GetCharacterMovement();  
cm-\>SetMovementMode(EMovementMode::MOVE\_NavWalking);

---

<div class="post-metadata">

**Author:** ![NPwn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NPwn](https://forums.unrealengine.com/u/NPwn)\
**Post date:** [December 16, 2022, 11:56am UTC](https://forums.unrealengine.com/t/simple-move-to-getting-stuck-on-corners/303854/17 "2022-12-16T11:56:56Z")

</div>

Wow this solved a ton of issues for us, thanks!
