Problems with navigation system?

Hi!

I’m having three problems moving a pawn (unit) using an AIController. In a custom PlayerController I call GetHitResultUnderCursor(ECC_Pawn, false, Hit); to raycast and extract the position the player clicked on. Then I use AAIController::MoveToLocation(location, 0.1f, false, true, false, false); in the AIController to move the unit. The problems are that:

  1. The player pawn is stopping a small distance before it reaches it’s final destination, even though I have set the acceptance radius to a small value and placed the mesh in the origo of the blueprint.

  2. If I press close and intense in front of the pawn when still moving, the pawn often starts to move towards the origo of the world/map. I check that the raycast actually did hit something.

  3. The RVO avoidance seems to function a bit strange and makes the pawns move very slowly in a wobbly strange path when near other pawns. You can also see some strafing even though strafing is supposed to be turned off and set to false in the move method call.

I have a video that shows problem 1 and 2 here video link.

I have a video that shows problem 3 here video link.

Issue 1 and 2 also exists in the Top Down template, both BP and CPP version. See demonstration here video link.

===================================================================================

Issue 1 is solved by setting the third parameter to false, kinda obvious when you actually read the parameter name.

AAIController::MoveToLocation(location, 0.1f, false, true, false, false);

Issue 2 and 3 (especially 2) looks like bugs in my opinion.

Have made them bold now, always good with some feedback. Thank you.

Very nicely documented, the videos really help a lot. (might want to bold the links due to AnswerHub coloring issues)

I hope Epic figures this out with you!

:slight_smile:

Rama

What class are you using for your units?

From where are you calling AAIController::MoveToLocation?

It’s possible to reproduce issue 2 by creating a new Top Down template. If you add some other pawns (units) you can also turn on RVO Avoidance to reproduce issue 3.

I’m going to close this thread and have provided the link to the duplicate topic that is being handled.

https://answers.unrealengine.com/questions/48320/bug-with-navigation-system.html#answer-48986

Thank you!

Tim