AI dodges player position
1. Modify EQS_FindPlayer, change the TraceMode in ProjectionData to geometry,
so that the navigation can be ignored, but a vertical judgment (vertical offset) is made , so that the uniform sphere can be distributed to the non-navigation area.
Add several other sections in FindPlayer to detail
Locations that players cannot see are filtered here
As shown in the figure, add a position here to judge the distance of the Npc from the player
Adding a surrounding environment judgment here, in fact, the linearity does not change, just changing the score to -1 can also achieve the same effect.
Finally, run it in the behavior tree
The running effect is as follows:
AI avoids player's sight
Temporary understanding:
Item is a specific object object, player, prop item
Querier is a queryer, and each point around it is compared with it. The current understanding is the surrounding environment query.
The behavior tree is consistent with the above picture
achieve effect
20211205