So it's been a while an I've updated Unity and Behavior Designer. It's really bugging me that this asset is not working for my purposes and I'm still trying to figure out if it's me, Unity, or this asset.
So, I've started with the default code that ships with Behavior Designer and I have NOT tampered with it at all. I changed the UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter.cs so that it will automatically use the NavMeshAgent.desiredVelocity like so:
C#:
private void Update()
{
remainingDistance = navAgent.remainingDistance;
if(navAgent.remainingDistance <= .2f) // If you don't do this, it won't stop moving
{
Move(Vector3.zero, false, false);
}
else
{
Move(navAgent.desiredVelocity, false, false);
}
}
This works WAY better than was I was attempting before. That's it for my changes.
Now, what I've done is set up a very simple BehaviorTree on a Humanoid AI Enemy. I have A Repeater->Pursue. Repeater is set to repeat indefinitely and Pursue is set to Speed 5, Arrive Distance 1.3, Update Rotation = false. Prediction values are set at 1 because it seemed the default 20 was way too high and I've tried the default as well, doesn't work either.
What happens:
The AI Enemy moves towards the target (the player in this case), but stops way outside of the range. If the player moves, then the AI enemy starts moving again, but as soon as the Player stops, so does the AI. Even if the NavMeshAgent.remainingDistance > 0.2f it still won't move. There isn't anything else stopping movement, so what is happening?
I've changed many values, tested this over and over. I'm exasperated, and very disappointed.
At this point, I do not believe I'm doing anything incorrectly. I've been trying different things since I last posted and none of them have worked to satisfaction. If you, Justin, would download the Unity Standard Assets Third Person Controller and set this up as I've done, maybe you can find what the problem is.