Within Distance Question.

MrQuaid

Member
I have a question about the Within Distance task. The image below is a small piece of my logic which basically tells the UCC npc to attack when in distance of player and stop seeking them. It doesn't work no matter how close I get to the enemy however if I add the can see object in the loop it works fine. I'm still way new to BD but why is it the can see object will override the other sequences but the within distance wont. It's like it doesn't even look for the distance, just stays X.


1547007887993.png
 
The easiest way to debug this is to place a breakpoint within WithinDistance.OnUpdate and see why the task is returning failure when you think that it should be returning success. From the behavior tree perspective flow perspective both Can See Object and Within Distance are the same.
 
Top