|
Post by blechi on Feb 9, 2020 19:14:55 GMT
Hello,
i'm using Invector Version 2.5.0 with Unity Version 2019.3.0f6 and i'm facing this problem:
The vEnemyAI-controller detects, chases player and attacks player depending on the values in the Detection-section if player enters detection-zone for the first time.
If player runs away and enters the detection-zone for the second time, vEnemyAI-controller can see the Player but will not chase and attack player, even if player deals damage to AI. The AI is blocking and dodging, but won't attack/chase.
I played around with different values in the Detection-section without success.
Only need simple AI to prevent player from entering specific areas depending on game progress.
Any hints?
|
|
|
Post by Invector on Feb 11, 2020 0:48:21 GMT
Indeed this is not the behavior we want and it's missing this line in the PatrolWaypoints() method, add at the end of the method:
if (canSeeTarget) currentState = AIStates.Chase;
This will make the character switch the currentState to Chase again
|
|
|
Post by blechi on Feb 11, 2020 20:04:04 GMT
Thank you for the fast answer!
I pasted code at end of PatrolWaypoints(), but no success.
State changes to "Chase" when AI-Controller detects player, but AI won't attack when entering detection-zone for second time.
What i found out:
If AIs Current State is set to "Idle" or "Wander", then AI attacks if player enters detection zone for the first time. If i set AIs Current State to "Chase", AI won't attack, even if player enters for the first time.
|
|
|
Post by Invector on Feb 20, 2020 1:17:21 GMT
I will take a better look at the chase behavior and upload a hotfix soon!
|
|