Last UCC Position

Drenyn

New member
I'm really new to Behavior Designer, so please overlook this if it's a silly question. I've been working on building out basically just a copy of the example tree for UCC Melee/Shooter but have ran into an issue where in the demo and my copy I can't really lose the AI once they have seen the agent/target. It looks like the Last Known position during "Seek" is always updating to where the player is currently so no matter how far away I get, I'm always found. Is this the way the logic should be working in the demo? I didn't think so, but have been able to re-create it in there as well, so wanted to verify.
 

Justin

Administrator
Staff member
Within the demo scene the Can See Object branch will reevaluate and set the Target variable (with the Set Shared Game Object task). This is done within this branch. When the agent no longer sees the player they will briefly look for the player and then give up if the target gets too far away. This is done within this branch.

If you haven't seen it take a look at the explanation of how the behavior tree works on this page.
 

Drenyn

New member
Thanks for checking on this @Justin. I did some additional testing to make sure I wasn't missing something and made a video if you wouldn't care to take a look.

In the Video I start recording after I'm out of sight and distance, the Agent Nolan in the demo gets hung on the terrain due to the Nav Mesh based on the height settings, but even though the player runs away the Agent Nolan never stops running or gives up. So the player walks back over to the Agent and the agent is able to go around the height portion and follow the player again, however even after losing the Agent, it continues to know where the player is at all times. This seems to only happen if the "Can See Object" branch is successful, as any other branches appear to work as they should, such as "Take Damage" if the player runs away, the Agent goes into "Wander".
 

Justin

Administrator
Staff member
It looks like the NavMesh slope settings are too extreme for what the Ultimate Character Locomotion component is set at. I also see what you mean with the AI always following the player. I've updated the sample with both of these fixes. The Within Distance branch had an inverter that wasn't supposed to be there.
 
Top