UCrowdFollowingComponent bug?

Hey, I am trying to make my character reash its destination point while avoiding another characters, I have decided to use crowd following component like this on my AI Controller:

AmyController::AmyController(const FObjectInitializer& ObjectInitializer) :
	Super(ObjectInitializer.SetDefaultSubobjectClass<UCrowdFollowingComponent>(TEXT("PathFollowingComponent")))
{

}

The character does avoid the others but in a weird way: UE4 UCrowdFollowingComponent bug? - YouTube

As you can see at first it decides to go to the right and immediatly go to the left while slowing its speed and keep looking at the reach point instead facing the walking direction.

I am using MoveToLocation to tell the character to move to the destination. I have read that RVO avoidness should be off so on the character class (Not the controller) I have seted bUseRVOAvoidance to false

this->GetCharacterMovement()->bUseRVOAvoidance = false;

What can make this happan is there a better way to avoid other characters?

Hey Darkstorm1997,

I’m not sure I understand the issue that you have with the way the character is avoiding. It appears to be working as intended from what I can see in the video. The character successfully avoids the obstacles as expected. If you aren’t already, I’d recommend using a DetourCrowdAIController as well:

https://docs.unrealengine.com/latest/INT/API/Runtime/AIModule/ADetourCrowdAIController/index.html

Typically, I’ve been able to use the DetourCrowdAIController in the past and have proper avoidance.

Let me know if you have any further questions.

Have a great day

Hey Sean Flint, again as you can see the character always looking at the target instead of facing the walking direction. I have uploaded another example which show the same problem:

Moreover the character slows its speed while avoiding, you can see how it is slows down as it get closer to the obstacle and after avoiding it increase the speed.

I have noticed one more problem. I have tried to add a cube obstacle in its way to see how the character handle 2 different kind of obstacles:

It seems that it could not get to the target although it has enough space to pass if it would walk down till the end of the last obstacle.

I can upload this project so you can test it if you want.

Sorry for the delay, please do upload the project and I’ll take a look to see if there could be a bug there. At first glance, it appears that there is just a setting missing somewhere, but I’d be glad to take a closer look.

Thanks

Hey, here is the download link:

Just summarizing the issues:
Facing at the target the whole time instead of looking at the walk direction, The slowing down before passing the obstacle, and the bug when the character did not know how to handle 2 different obstacle types.

Alright, try going into your Character blueprint and enabling Orient Rotation to Movement in the CharacterMovementComponent and then disabling Use Controller Rotation Yaw in the class defaults. This should give you your desired behavior.

Have a great day

Ok that fixed the face at the walking direction problem but it did not fix the 2 other problems.

As you can see on the video the character still can not reach to the target (Which is of the left side of the characters line obstacle) Although it is reachable.

The second problem as you can see that the character looks “confused”. It looks like it does not know how to choose the walking path and walk right then left loop until it stops. You can see it the the video in 0:01 to 0:02 and 0:05 to 0:06.

Please refer to both of the problems. I appreciate your help.

Sorry for the delay, I’m currently reaching out to one of our developers to assist with this issue, and I’ll respond as soon as I have new information.

After speaking to our developers, it appears that this is not a bug:

If the move goal is behind a row of agents that a given AI agent is supposed to avoid then there’s nothing the crowd simulation alone can do about it. The only thing I can suggest is having dynamic navmesh enabled and whenever an agent deliberately stops have him punch a hole in the navmesh so that other agents can path around him (rather than avoid him reactively).

Have a great day

Hello,

How are you supposed to quote:

‘whenever an agent deliberately stops have him punch a hole in the navmesh so that other agents can path around him (rather than avoid him reactively)’?

Because the character movement (working on a top-down game) seems to be quite sluggish and the character slows down for me too, and not only that it acts quite jittery.

How am I supposed to ‘punch a hole in the navmesh’? And this doesn’t happen only to other actors, but any items (like doors that can be opened/closed) that dynamically modify the navmesh cause the character to act sluggish, slow down etc… I am sure this is not the desired behavior, there is no reason for the character to slow down or to act dumb.

Thanks a lot!